MCPcopy
hub / github.com/flosch/pongo2 / BenchmarkCacheDebugOn

Function BenchmarkCacheDebugOn

pongo2_template_test.go:633–646  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

631}
632
633func BenchmarkCacheDebugOn(b *testing.B) {
634 cacheDebugSet := pongo2.NewSet("cache set", pongo2.MustNewLocalFileSystemLoader(""))
635 cacheDebugSet.Debug = true
636 for i := 0; i < b.N; i++ {
637 tpl, err := cacheDebugSet.FromFile("template_tests/complex.tpl")
638 if err != nil {
639 b.Fatal(err)
640 }
641 err = tpl.ExecuteWriterUnbuffered(tplContext, ioutil.Discard)
642 if err != nil {
643 b.Fatal(err)
644 }
645 }
646}
647
648func BenchmarkExecuteComplexWithSandboxActive(b *testing.B) {
649 tpl, err := pongo2.FromFile("template_tests/complex.tpl")

Callers

nothing calls this directly

Calls 2

FromFileMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…