Kaynağa Gözat

lib/weakhash: Fix speed reporting in benchmark (#6470)

greatroar 5 yıl önce
ebeveyn
işleme
cc1b003f21
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      lib/weakhash/benchmark_test.go

+ 1 - 1
lib/weakhash/benchmark_test.go

@@ -93,7 +93,7 @@ func BenchmarkBlock(b *testing.B) {
 						test.hash.Reset()
 					}
 
-					bbb.SetBytes(int64(len(buf)))
+					bbb.SetBytes(testSize)
 					bbb.ReportAllocs()
 				})