(b *testing.B)
| 31 | } |
| 32 | |
| 33 | func BenchmarkBytePool_Get(b *testing.B) { |
| 34 | runtime.GOMAXPROCS(1) |
| 35 | |
| 36 | var pool = utils.NewBytePool(1) |
| 37 | b.ResetTimer() |
| 38 | |
| 39 | for i := 0; i < b.N; i++ { |
| 40 | var buf = pool.Get() |
| 41 | _ = buf |
| 42 | pool.Put(buf) |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | func BenchmarkBytePool_Get_Parallel(b *testing.B) { |
| 47 | runtime.GOMAXPROCS(1) |
nothing calls this directly
no test coverage detected