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

Function BenchmarkExecuteBlocksDeepWithSandboxActive

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

Source from the content-addressed store, hash-verified

766}
767
768func BenchmarkExecuteBlocksDeepWithSandboxActive(b *testing.B) {
769 blockNames := []string{"body", "more_content"}
770 tpl, err := pongo2.FromFile("template_tests/block_render/deep.tpl")
771 if err != nil {
772 b.Fatal(err)
773 }
774 b.ResetTimer()
775 for i := 0; i < b.N; i++ {
776 _, err = tpl.ExecuteBlocks(tplContext, blockNames)
777 if err != nil {
778 b.Fatal(err)
779 }
780 }
781}
782
783func BenchmarkExecuteBlocksWithEmptyBlocksSandboxActive(b *testing.B) {
784 blockNames := []string{}

Callers

nothing calls this directly

Calls 2

FromFileMethod · 0.80
ExecuteBlocksMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…