This is an automated email from the git hooks/post-receive script.
itchyonion pushed a commit to branch main in repository pluggable-transports/snowflake.
The following commit(s) were added to refs/heads/main by this push: new 5cc849e fix: up/down traffic stats being mixed up 5cc849e is described below
commit 5cc849e186a7b5f5cac238e3497a64bd46ac0a29 Author: WofWca wofwca@protonmail.com AuthorDate: Thu Jan 12 08:54:59 2023 +0000
fix: up/down traffic stats being mixed up --- proxy/lib/pt_event_logger.go | 2 +- proxy/lib/util.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/proxy/lib/pt_event_logger.go b/proxy/lib/pt_event_logger.go index ce89545..745437b 100644 --- a/proxy/lib/pt_event_logger.go +++ b/proxy/lib/pt_event_logger.go @@ -41,7 +41,7 @@ func (p *logEventLogger) OnNewSnowflakeEvent(e event.SnowflakeEvent) { func (p *logEventLogger) logTick() error { inbound, inboundUnit := formatTraffic(p.inboundSum) outbound, outboundUnit := formatTraffic(p.outboundSum) - p.logger.Printf("In the last %v, there were %v connections. Traffic Relayed ↑ %v %v, ↓ %v %v.\n", + p.logger.Printf("In the last %v, there were %v connections. Traffic Relayed ↓ %v %v, ↑ %v %v.\n", p.logPeriod.String(), p.connectionCount, inbound, inboundUnit, outbound, outboundUnit) p.outboundSum = 0 p.inboundSum = 0 diff --git a/proxy/lib/util.go b/proxy/lib/util.go index 0bbe588..dd8681e 100644 --- a/proxy/lib/util.go +++ b/proxy/lib/util.go @@ -80,7 +80,7 @@ func (b *bytesSyncLogger) ThroughputSummary() string { outbound, outUnit := formatTraffic(outbound)
t := time.Now() - return fmt.Sprintf("Traffic throughput (up|down): %d %s|%d %s -- (%d OnMessages, %d Sends, over %d seconds)", inbound, inUnit, outbound, outUnit, b.outEvents, b.inEvents, int(t.Sub(b.start).Seconds())) + return fmt.Sprintf("Traffic throughput (down|up): %d %s|%d %s -- (%d OnMessages, %d Sends, over %d seconds)", inbound, inUnit, outbound, outUnit, b.outEvents, b.inEvents, int(t.Sub(b.start).Seconds())) }
func (b *bytesSyncLogger) GetStat() (in int64, out int64) { return b.inbound, b.outbound }
tor-commits@lists.torproject.org