diff --git a/common/bitutil/compress_test.go b/common/bitutil/compress_test.go index c6f6fe8bcf..0edd3a790b 100644 --- a/common/bitutil/compress_test.go +++ b/common/bitutil/compress_test.go @@ -180,7 +180,7 @@ func benchmarkEncoding(b *testing.B, bytes int, fill float64) { // Reset the benchmark and measure encoding/decoding b.ResetTimer() b.ReportAllocs() - for i := 0; i < b.N; i++ { + for range b.Loop() { bitsetDecodeBytes(bitsetEncodeBytes(data), len(data)) } }