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

Method FunctionTrackerWithOptions

common/cost/model.go:1268–1271  ·  view source on GitHub ↗

FunctionTrackerWithOptions returns a FunctionTracker implementing the cost model, configured by the supplied options. ModelVersion applies to tracking as it does to estimation, so that a call's estimate and its charge are computed by the same rules.

(opts ...ModelOption)

Source from the content-addressed store, hash-verified

1266// ModelVersion applies to tracking as it does to estimation, so that a call's estimate and its
1267// charge are computed by the same rules.
1268func (m OverloadModel) FunctionTrackerWithOptions(opts ...ModelOption) FunctionTracker {
1269 resolved := newModelOptions(opts...)
1270 return m.buildTracker(resolved.strategy, resolved.version)
1271}
1272
1273func (m OverloadModel) buildTracker(strategy SizingStrategy, version uint32) FunctionTracker {
1274 if prior, ok := priorForVersion(m.priors, version); ok {

Callers 6

trackModelCostFunction · 0.80
TestOptionalTrackedSizeFunction · 0.80
TestOptionalQuantityFunction · 0.80
trackerCompilerFunction · 0.80

Calls 2

buildTrackerMethod · 0.95
newModelOptionsFunction · 0.85

Tested by 4

trackModelCostFunction · 0.64
TestOptionalTrackedSizeFunction · 0.64
TestOptionalQuantityFunction · 0.64