Skip to content

Commit

Permalink
Dont reset cache stats
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmacdonald committed Jun 8, 2020
1 parent 57fee79 commit 7735ebd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ func Get() RuntimeMetrics {
debug.ReadGCStats(&gc)
var m RuntimeMetrics

m.TorrentsTotalCached = atomic.SwapInt64(&TorrentsTotalCached, 0)
m.UsersTotalCached = atomic.SwapInt64(&UsersTotalCached, 0)
m.PeersTotalCached = atomic.SwapInt64(&PeersTotalCached, 0)
m.TorrentsTotalCached = atomic.LoadInt64(&TorrentsTotalCached)
m.UsersTotalCached = atomic.LoadInt64(&UsersTotalCached)
m.PeersTotalCached = atomic.LoadInt64(&PeersTotalCached)
m.AnnounceTotal = atomic.SwapInt64(&AnnounceTotal, 0)
m.AnnounceStatusOK = atomic.SwapInt64(&AnnounceStatusOK, 0)
m.AnnounceStatusUnauthorized = atomic.SwapInt64(&AnnounceStatusUnauthorized, 0)
Expand Down

0 comments on commit 7735ebd

Please sign in to comment.