소스 검색

fix(metrics): default updateSince to ms

bergquist 9 년 전
부모
커밋
3c9432b7e9
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      pkg/metrics/timer.go

+ 2 - 1
pkg/metrics/timer.go

@@ -222,7 +222,8 @@ func (t *StandardTimer) Update(d time.Duration) {
 func (t *StandardTimer) UpdateSince(ts time.Time) {
 	t.mutex.Lock()
 	defer t.mutex.Unlock()
-	t.histogram.Update(int64(time.Since(ts)))
+	sinceMs := time.Since(ts) / time.Millisecond
+	t.histogram.Update(int64(sinceMs))
 	t.meter.Mark(1)
 }