[tor-commits] [snowflake/master] Use %.f not %.g to format stats interval.
dcf at torproject.org
dcf at torproject.org
Fri Oct 20 20:02:03 UTC 2017
commit 9ab8ea3df4eb6cbe800e816c8b2fe58a9db6c368
Author: David Fifield <david at bamsoftware.com>
Date: Fri Oct 20 12:25:19 2017 -0700
Use %.f not %.g to format stats interval.
fmt.Sprintf("%.g", 86400.4) → "9e+04"
fmt.Sprintf("%.f", 86400.4) → "86400"
---
server/stats.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/stats.go b/server/stats.go
index 51b2f7e..204e587 100644
--- a/server/stats.go
+++ b/server/stats.go
@@ -32,7 +32,7 @@ func statsThread() {
numConnections += 1
case <-deadline:
now := time.Now()
- log.Printf("in the past %.g s, %d/%d connections had client_ip",
+ log.Printf("in the past %.f s, %d/%d connections had client_ip",
(now.Sub(prevTime)).Seconds(),
numClientIP, numConnections)
numClientIP = 0
More information about the tor-commits
mailing list