(b *testing.B)
| 47 | } |
| 48 | |
| 49 | func BenchmarkNewBufferPool3(b *testing.B) { |
| 50 | var pool = utils.NewBufferPool() |
| 51 | var dataString = strings.Repeat("Hello", 1024) |
| 52 | |
| 53 | b.RunParallel(func(pb *testing.PB) { |
| 54 | for pb.Next() { |
| 55 | var buffer = pool.Get() |
| 56 | buffer.Write([]byte(dataString)) |
| 57 | pool.Put(buffer) |
| 58 | } |
| 59 | }) |
| 60 | } |
| 61 | |
| 62 | func BenchmarkNewBufferPool4(b *testing.B) { |
| 63 | var pool = utils.NewBufferPool() |
nothing calls this directly
no test coverage detected