MCPcopy Create free account
hub / github.com/jmespath/go-jmespath / BenchmarkInterpretSingleFieldStruct

Function BenchmarkInterpretSingleFieldStruct

interpreter_test.go:184–192  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

182}
183
184func BenchmarkInterpretSingleFieldStruct(b *testing.B) {
185 intr := newInterpreter()
186 parser := NewParser()
187 ast, _ := parser.Parse("fooasdfasdfasdfasdf")
188 data := benchmarkStruct{"foobarbazqux"}
189 for i := 0; i < b.N; i++ {
190 intr.Execute(ast, &data)
191 }
192}
193
194func BenchmarkInterpretNestedStruct(b *testing.B) {
195 intr := newInterpreter()

Callers

nothing calls this directly

Calls 4

ParseMethod · 0.95
newInterpreterFunction · 0.85
NewParserFunction · 0.85
ExecuteMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…