Skip to content

Commit

Permalink
Update sweeper.go
Browse files Browse the repository at this point in the history
  • Loading branch information
web3-bot authored Mar 14, 2024
1 parent 6f13c62 commit 7e2a3e1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sweeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package flow
import (
"math"
"sync"
"sync/atomic"
"time"

"github.com/benbjohnson/clock"
Expand Down Expand Up @@ -103,7 +102,7 @@ func (sw *sweeper) update() {

// update the totals but leave the rates alone.
for _, m := range sw.meters {
m.snapshot.Total = atomic.LoadUint64(&m.accumulator)
m.snapshot.Total = m.accumulator.Load()

Check warning on line 105 in sweeper.go

View check run for this annotation

Codecov / codecov/patch

sweeper.go#L105

Added line #L105 was not covered by tests
}
return
} else if tdiff <= ewmaRate/10 {
Expand Down

0 comments on commit 7e2a3e1

Please sign in to comment.