mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 11:11:30 -04:00
Rename metrics update functions
This changes the metrics update functions to UpdateProxyStats and UpdateClientStats, which is more accurate and clear than the previous CountryStats and RendezvousStats names.
This commit is contained in:
parent
78cf8e68b2
commit
1d73e14f34
3 changed files with 7 additions and 7 deletions
|
@ -88,7 +88,7 @@ func (m *Metrics) IncrementCounter(key string) {
|
|||
incrementMapCounter(m.counters, key)
|
||||
}
|
||||
|
||||
func (m *Metrics) UpdateCountryStats(addr string, proxyType string, natType string) {
|
||||
func (m *Metrics) UpdateProxyStats(addr string, proxyType string, natType string) {
|
||||
|
||||
// perform geolocation of IP address
|
||||
ip := net.ParseIP(addr)
|
||||
|
@ -140,7 +140,7 @@ func (m *Metrics) UpdateCountryStats(addr string, proxyType string, natType stri
|
|||
}).Inc()
|
||||
}
|
||||
|
||||
func (m *Metrics) UpdateRendezvousStats(addr string, rendezvousMethod messages.RendezvousMethod, natType, status string) {
|
||||
func (m *Metrics) UpdateClientStats(addr string, rendezvousMethod messages.RendezvousMethod, natType, status string) {
|
||||
ip := net.ParseIP(addr)
|
||||
country := "??"
|
||||
if m.geoipdb != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue