Skip to content

Commit e866bee

Browse files
committed
fix: clear timestamps after submitting them to the runner
1 parent 93f2c82 commit e866bee

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

testing/testing/benchmark.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,9 @@ func (b *B) submitAccumulatedTimestamps() {
243243
b.codspeed.accumulatedEndTimestamps[i],
244244
)
245245
}
246+
// Clear the accumulated timestamps after submitting
247+
b.codspeed.accumulatedStartTimestamps = b.codspeed.accumulatedStartTimestamps[:0]
248+
b.codspeed.accumulatedEndTimestamps = b.codspeed.accumulatedEndTimestamps[:0]
246249
}
247250

248251
// SetBytes records the number of bytes processed in a single operation.

0 commit comments

Comments
 (0)