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

Function CostTrackerFactory

interpreter/runtimecost.go:91–96  ·  view source on GitHub ↗

CostTrackerFactory configures the factory method to generate a new cost-tracker per-evaluation.

(factory func() (*CostTracker, error))

Source from the content-addressed store, hash-verified

89
90// CostTrackerFactory configures the factory method to generate a new cost-tracker per-evaluation.
91func CostTrackerFactory(factory func() (*CostTracker, error)) CostTrackPlanOption {
92 return func(fac *costTrackerFactory) *costTrackerFactory {
93 fac.factory = factory
94 return fac
95 }
96}
97
98// CostObserver provides an observer that tracks runtime cost.
99func CostObserver(opts ...CostTrackPlanOption) PlannerOption {

Callers 4

newProgramFunction · 0.92
TestListMapAccessCostFunction · 0.85
runOptionsBenchmarkFunction · 0.85

Calls

no outgoing calls

Tested by 3

TestListMapAccessCostFunction · 0.68
runOptionsBenchmarkFunction · 0.68