Skip to content
This repository was archived by the owner on Jun 20, 2023. It is now read-only.

Commit 52ca04e

Browse files
committed
Fix pool usage in benchmark
License: MIT Signed-off-by: Jakub Sztandera <[email protected]>
1 parent cd78345 commit 52ca04e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

splitting_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77

88
u "github.com/ipfs/go-ipfs-util"
99
util "github.com/ipfs/go-ipfs-util"
10+
pool "github.com/libp2p/go-buffer-pool"
1011
)
1112

1213
func randBuf(t *testing.T, size int) []byte {
@@ -142,6 +143,7 @@ func BenchmarkDefault(b *testing.B) {
142143
b.Fatal(err)
143144
}
144145
res = res + uint64(len(chunk))
146+
pool.Put(chunk)
145147
}
146148
}
147149
Res = Res + res

0 commit comments

Comments
 (0)