MCPcopy Index your code
hub / github.com/zalando/skipper / BenchmarkNewState

Function BenchmarkNewState

script/script_test.go:1031–1039  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

1029}
1030
1031func BenchmarkNewState(b *testing.B) {
1032 f, _ := newFilter(LuaOptions{}, `function request(ctx, params) end`)
1033 s := f.(*script)
1034
1035 b.ResetTimer()
1036 for i := 0; i < b.N; i++ {
1037 s.newState()
1038 }
1039}
1040
1041func benchmarkRequest(b *testing.B, script string, params ...string) {
1042 f, _ := newFilter(LuaOptions{}, script, params...)

Callers

nothing calls this directly

Calls 2

newFilterFunction · 0.85
newStateMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…