Exemple #1
0
func TestBspool(t *testing.T) {
	bp := bpool.NewSizedBufferPool(DefaultPoolSize, DefaultBufSize)
	test(t, bp)
}
Exemple #2
0
func BenchmarkHighBpool(b *testing.B) {
	bp := bpool.NewSizedBufferPool(DefaultPoolSize, DefaultBufSize)
	bench(b, bp, highConcurrency)
}
Exemple #3
0
// NewSizedBufferPool creates a new sized buffer pool.
func NewSizedBufferPool(size int, alloc int) BufferPool {
	return bpool.NewSizedBufferPool(size, alloc)
}