update:Use the Milliseconds method of duration to get the number of milliseconds (#3285)

Co-authored-by: Kevin Wan <wanjunfeng@gmail.com>
This commit is contained in:
me-cs
2023-05-26 22:32:46 +08:00
committed by GitHub
parent 8b4382dcec
commit 0217044900
6 changed files with 7 additions and 10 deletions

View File

@@ -136,7 +136,7 @@ func (e *realSqlGuard) finish(ctx context.Context, err error) {
logSqlError(ctx, e.stmt, err)
}
metricReqDur.Observe(int64(duration/time.Millisecond), e.command)
metricReqDur.Observe(duration.Milliseconds(), e.command)
}
func (e *realSqlGuard) start(q string, args ...any) error {