mirror of
https://github.com/mailgun/groupcache.git
synced 2024-07-03 03:18:53 +00:00
style(metrics): rename get from peers stats
This commit is contained in:
parent
fb2028f2ff
commit
6308e62bbb
|
@ -197,7 +197,7 @@ type flightGroup interface {
|
||||||
type Stats struct {
|
type Stats struct {
|
||||||
Gets AtomicInt // any Get request, including from peers
|
Gets AtomicInt // any Get request, including from peers
|
||||||
CacheHits AtomicInt // either cache was good
|
CacheHits AtomicInt // either cache was good
|
||||||
GetFromPeersSlowestDuration AtomicInt // slowest duration to request value from peers
|
GetFromPeersLatencyLower AtomicInt // slowest duration to request value from peers
|
||||||
PeerLoads AtomicInt // either remote load or remote cache hit (not an error)
|
PeerLoads AtomicInt // either remote load or remote cache hit (not an error)
|
||||||
PeerErrors AtomicInt
|
PeerErrors AtomicInt
|
||||||
Loads AtomicInt // (gets - cacheHits)
|
Loads AtomicInt // (gets - cacheHits)
|
||||||
|
@ -339,8 +339,8 @@ func (g *Group) load(ctx context.Context, key string, dest Sink) (value ByteView
|
||||||
duration := int64(time.Since(start)) / int64(time.Millisecond)
|
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.GetFromPeersLatencyLower.Get() < duration {
|
||||||
g.Stats.GetFromPeersSlowestDuration.Store(duration)
|
g.Stats.GetFromPeersLatencyLower.Store(duration)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err == nil {
|
if err == nil {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user