Browse Source

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

Ask Bjørn Hansen 12 years ago
parent
commit
ab1bafb08b
1 changed files with 2 additions and 1 deletions
  1. 2 1
      metrics.go

+ 2 - 1
metrics.go

@@ -45,7 +45,8 @@ func (m *ServerMetrics) Updater() {
 	for {
 	for {
 		time.Sleep(1 * time.Second)
 		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()
 		current := qCounter.Count()
 		newQueries := current - m.lastQueryCount
 		newQueries := current - m.lastQueryCount