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