Rate from the newest bucket, stamped when the counters are actually read

This commit is contained in:
flamingcow
2026-08-04 13:45:16 -07:00
parent 2035d42734
commit 4e60757937
2 changed files with 26 additions and 40 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ func TestResetDoesNotUnderflowTotals(t *testing.T) {
d.rxStats[0].frames.Store(100)
d.rxStats[0].bytes.Store(6400)
d.sample(time.Now())
d.sample()
d.rxStats[0].frames.Store(150)
d.rxStats[0].bytes.Store(9600)