Fix pool usage in benchmark

License: MIT
Signed-off-by: default avatarJakub Sztandera <kubuxu@protocol.ai>
parent cd783450
......@@ -7,6 +7,7 @@ import (
u "github.com/ipfs/go-ipfs-util"
util "github.com/ipfs/go-ipfs-util"
pool "github.com/libp2p/go-buffer-pool"
)
func randBuf(t *testing.T, size int) []byte {
......@@ -142,6 +143,7 @@ func BenchmarkDefault(b *testing.B) {
b.Fatal(err)
}
res = res + uint64(len(chunk))
pool.Put(chunk)
}
}
Res = Res + res
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment