(size uint32, b *testing.B)
| 328 | } |
| 329 | |
| 330 | func benchappendBytes(size uint32, b *testing.B) { |
| 331 | bts := RandBytes(int(size)) |
| 332 | buf := make([]byte, 0, len(bts)+5) |
| 333 | b.SetBytes(int64(len(bts) + 5)) |
| 334 | b.ReportAllocs() |
| 335 | b.ResetTimer() |
| 336 | for i := 0; i < b.N; i++ { |
| 337 | AppendBytes(buf[0:0], bts) |
| 338 | } |
| 339 | } |
| 340 | |
| 341 | func BenchmarkAppend16Bytes(b *testing.B) { benchappendBytes(16, b) } |
| 342 |
no test coverage detected
searching dependent graphs…