aboutsummaryrefslogtreecommitdiffstats
path: root/metrics/metrics_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'metrics/metrics_test.go')
-rw-r--r--metrics/metrics_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/metrics/metrics_test.go b/metrics/metrics_test.go
index 726fba347..df36da0ad 100644
--- a/metrics/metrics_test.go
+++ b/metrics/metrics_test.go
@@ -6,6 +6,7 @@ import (
"log"
"sync"
"testing"
+ "time"
)
const FANOUT = 128
@@ -114,7 +115,7 @@ func Example() {
// Threadsafe registration
t := GetOrRegisterTimer("db.get.latency", nil)
- t.Time(func() {})
+ t.Time(func() { time.Sleep(10 * time.Millisecond) })
t.Update(1)
fmt.Println(c.Count())