Report allocs for reconstruct (#181)

master
Klaus Post 2022-02-09 00:53:36 -08:00 committed by GitHub
parent 1bb4d699e1
commit 8e17d64e52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -1063,6 +1063,7 @@ func benchmarkReconstruct(b *testing.B, dataShards, parityShards, shardSize int)
b.SetBytes(int64(shardSize * (dataShards + parityShards)))
b.ResetTimer()
b.ReportAllocs()
for i := 0; i < b.N; i++ {
corruptRandom(shards, dataShards, parityShards)
@ -1137,6 +1138,7 @@ func benchmarkReconstructData(b *testing.B, dataShards, parityShards, shardSize
b.SetBytes(int64(shardSize * (dataShards + parityShards)))
b.ResetTimer()
b.ReportAllocs()
for i := 0; i < b.N; i++ {
corruptRandomData(shards, dataShards, parityShards)
@ -1190,6 +1192,7 @@ func benchmarkReconstructP(b *testing.B, dataShards, parityShards, shardSize int
b.SetBytes(int64(shardSize * (dataShards + parityShards)))
b.ResetTimer()
b.ReportAllocs()
b.RunParallel(func(pb *testing.PB) {
shards := make([][]byte, parityShards+dataShards)