mirror of
https://github.com/mailgun/groupcache.git
synced 2024-10-04 13:49:43 +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)
|
value, err = g.getFromPeer(ctx, peer, key)
|
||||||
|
|
||||||
// metrics duration compute
|
// metrics duration compute
|
||||||
duration := time.Since(start).Milliseconds()
|
duration := int64(time.Since(start)) / int64(time.Millisecond)
|
||||||
|
|
||||||
// metrics only store the slowest duration
|
// metrics only store the slowest duration
|
||||||
if g.Stats.GetFromPeersSlowestDuration.Get() < duration {
|
if g.Stats.GetFromPeersSlowestDuration.Get() < duration {
|
||||||
|
Loading…
Reference in New Issue
Block a user