MCPcopy Index your code
hub / github.com/expr-lang/expr / BenchmarkSumRange_Unoptimized

Function BenchmarkSumRange_Unoptimized

optimizer/sum_range_test.go:277–289  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

275}
276
277func BenchmarkSumRange_Unoptimized(b *testing.B) {
278 program, err := expr.Compile(`sum(1..100)`, expr.Optimize(false))
279 require.NoError(b, err)
280
281 var out any
282 b.ResetTimer()
283 for n := 0; n < b.N; n++ {
284 out, _ = expr.Run(program, nil)
285 }
286 b.StopTimer()
287
288 require.Equal(b, 5050, out)
289}

Callers

nothing calls this directly

Calls 5

CompileFunction · 0.92
OptimizeFunction · 0.92
NoErrorFunction · 0.92
RunFunction · 0.92
EqualFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…