MCPcopy Create free account
hub / github.com/unrolled/render / BenchmarkBigHTMLBuffers

Function BenchmarkBigHTMLBuffers

render_html_test.go:75–87  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

73}
74
75func 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
89func BenchmarkSmallHTMLBuffers(b *testing.B) {
90 b.ReportAllocs()

Callers

nothing calls this directly

Calls 2

NewFunction · 0.85
HTMLMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…