Skip to content

Commit

Permalink
Fix stats rate calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbourgon committed Jun 6, 2023
1 parent 3c5c0f6 commit b5894e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion trcstore/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ func (sc *StatsCategory) Rate() (r float64) {

var (
total = sc.TotalCount()
delta = sc.Newest.Sub(sc.Oldest)
delta = time.Since(sc.Oldest)
totalZero = total <= 0
deltaZero = delta <= 0
newestZero = sc.Newest.IsZero()
Expand Down

0 comments on commit b5894e7

Please sign in to comment.