(b *testing.B)
| 41 | } |
| 42 | |
| 43 | func BenchmarkFlateWriter(b *testing.B) { |
| 44 | b.ReportAllocs() |
| 45 | for i := 0; i < b.N; i++ { |
| 46 | w, _ := flate.NewWriter(io.Discard, flate.BestSpeed) |
| 47 | // We have to write a byte to get the writer to allocate to its full extent. |
| 48 | w.Write([]byte{'a'}) |
| 49 | w.Flush() |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | func BenchmarkFlateReader(b *testing.B) { |
| 54 | b.ReportAllocs() |
nothing calls this directly
no test coverage detected
searching dependent graphs…