Explorar o código

Make sure go-metrics get some input to update the qCounter rates

Ask Bjørn Hansen %!s(int64=12) %!d(string=hai) anos
pai
achega
ab1bafb08b
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      metrics.go

+ 2 - 1
metrics.go

@@ -45,7 +45,8 @@ func (m *ServerMetrics) Updater() {
 	for {
 		time.Sleep(1 * time.Second)
 
-		// log.Println("updating metrics")
+		// Make sure go-metrics get some input to update the rate
+		qCounter.Mark(0)
 
 		current := qCounter.Count()
 		newQueries := current - m.lastQueryCount