From 369a4c4bfadbd4ca10d6346b993e41c1c2a47892 Mon Sep 17 00:00:00 2001 From: Icarus Wu Date: Thu, 16 Nov 2023 21:50:23 +0800 Subject: [PATCH] metric milliseconds computation with golang original method (#11403) Signed-off-by: Icarus9913 --- metrics/metrics.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metrics/metrics.go b/metrics/metrics.go index 244ae59d2..f20814e91 100644 --- a/metrics/metrics.go +++ b/metrics/metrics.go @@ -839,7 +839,7 @@ var GatewayNodeViews = append([]*view.View{ // SinceInMilliseconds returns the duration of time since the provide time as a float64. func SinceInMilliseconds(startTime time.Time) float64 { - return float64(time.Since(startTime).Nanoseconds()) / 1e6 + return float64(time.Since(startTime).Milliseconds()) } // Timer is a function stopwatch, calling it starts the timer,