MCPcopy Create free account
hub / github.com/cel-expr/cel-go / CostTrackerOptions

Function CostTrackerOptions

cel/options.go:805–810  ·  view source on GitHub ↗

CostTrackerOptions configures a set of options for cost-tracking. Note, CostTrackerOptions is a no-op unless CostTracking is also enabled.

(costOpts ...interpreter.CostTrackerOption)

Source from the content-addressed store, hash-verified

803//
804// Note, CostTrackerOptions is a no-op unless CostTracking is also enabled.
805func CostTrackerOptions(costOpts ...interpreter.CostTrackerOption) ProgramOption {
806 return func(p *prog) (*prog, error) {
807 p.costOptions = append(p.costOptions, costOpts...)
808 return p, nil
809 }
810}
811
812// CostTracking enables cost tracking and registers a ActualCostEstimator that can optionally provide a runtime cost estimate for any function calls.
813func CostTracking(costEstimator interpreter.ActualCostEstimator) ProgramOption {

Callers 10

ProgramOptionsMethod · 0.92
ProgramOptionsMethod · 0.92
ProgramOptionsMethod · 0.92
ProgramOptionsMethod · 0.92
ProgramOptionsMethod · 0.92
ProgramOptionsMethod · 0.92
ProgramOptionsMethod · 0.92
TestEvalFunction · 0.85
TestCostLimitFunction · 0.85

Calls

no outgoing calls

Tested by 3

TestEvalFunction · 0.68
TestCostLimitFunction · 0.68