(b *testing.B)
| 44 | } |
| 45 | |
| 46 | func BenchmarkBytePool_Get_Parallel(b *testing.B) { |
| 47 | runtime.GOMAXPROCS(1) |
| 48 | |
| 49 | var pool = utils.NewBytePool(1024) |
| 50 | b.ResetTimer() |
| 51 | |
| 52 | b.RunParallel(func(pb *testing.PB) { |
| 53 | for pb.Next() { |
| 54 | var buf = pool.Get() |
| 55 | pool.Put(buf) |
| 56 | } |
| 57 | }) |
| 58 | } |
| 59 | |
| 60 | func BenchmarkBytePool_Get_Sync(b *testing.B) { |
| 61 | runtime.GOMAXPROCS(1) |
nothing calls this directly
no test coverage detected