(b *testing.B, rowsCount int)
| 69 | } |
| 70 | |
| 71 | func benchmarkHTMLTemplate(b *testing.B, rowsCount int) { |
| 72 | rows := getBenchRows(rowsCount) |
| 73 | b.RunParallel(func(pb *testing.PB) { |
| 74 | bb := quicktemplate.AcquireByteBuffer() |
| 75 | for pb.Next() { |
| 76 | if err := tpl.Execute(bb, rows); err != nil { |
| 77 | b.Fatalf("unexpected error: %s", err) |
| 78 | } |
| 79 | bb.Reset() |
| 80 | } |
| 81 | quicktemplate.ReleaseByteBuffer(bb) |
| 82 | }) |
| 83 | } |
| 84 | |
| 85 | func BenchmarkTextTemplate1(b *testing.B) { |
| 86 | benchmarkTextTemplate(b, 1) |
no test coverage detected
searching dependent graphs…