(b *testing.B)
| 73 | } |
| 74 | |
| 75 | func BenchmarkBigHTMLBuffers(b *testing.B) { |
| 76 | b.ReportAllocs() |
| 77 | |
| 78 | render := New(Options{ |
| 79 | Directory: "testdata/basic", |
| 80 | }) |
| 81 | |
| 82 | buf := new(bytes.Buffer) |
| 83 | for i := 0; i < b.N; i++ { |
| 84 | _ = render.HTML(buf, http.StatusOK, "hello", "gophers") |
| 85 | buf.Reset() |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | func BenchmarkSmallHTMLBuffers(b *testing.B) { |
| 90 | b.ReportAllocs() |