mirror of
https://github.com/mailgun/groupcache.git
synced 2024-11-16 14:10:04 +00:00
fix(metrics): use backward compatible time computation for duration
This commit is contained in:
parent
3f7232faca
commit
ae2e156f19
@ -336,7 +336,7 @@ func (g *Group) load(ctx context.Context, key string, dest Sink) (value ByteView
|
||||
value, err = g.getFromPeer(ctx, peer, key)
|
||||
|
||||
// metrics duration compute
|
||||
duration := time.Since(start).Milliseconds()
|
||||
duration := int64(time.Since(start)) / int64(time.Millisecond)
|
||||
|
||||
// metrics only store the slowest duration
|
||||
if g.Stats.GetFromPeersSlowestDuration.Get() < duration {
|
||||
|
Loading…
Reference in New Issue
Block a user