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

Method FunctionEstimatorWithOptions

common/cost/model.go:1211–1214  ·  view source on GitHub ↗

FunctionEstimatorWithOptions returns a FunctionEstimator implementing the cost model, configured by the supplied options. Unset options take their defaults: the default SizingStrategy and the latest model revision.

(opts ...ModelOption)

Source from the content-addressed store, hash-verified

1209// by the supplied options. Unset options take their defaults: the default SizingStrategy and the
1210// latest model revision.
1211func (m OverloadModel) FunctionEstimatorWithOptions(opts ...ModelOption) FunctionEstimator {
1212 resolved := newModelOptions(opts...)
1213 return m.buildEstimator(resolved.strategy, resolved.version)
1214}
1215
1216func (m OverloadModel) buildEstimator(strategy SizingStrategy, version uint32) FunctionEstimator {
1217 if prior, ok := priorForVersion(m.priors, version); ok {

Callers 10

TestVersion1RevisionsFunction · 0.80
estimateModelCostFunction · 0.80
TestLengthEstimateFunction · 0.80
TestOptionalQuantityFunction · 0.80
estimatorCompilerFunction · 0.80

Calls 2

buildEstimatorMethod · 0.95
newModelOptionsFunction · 0.85

Tested by 8

TestVersion1RevisionsFunction · 0.64
estimateModelCostFunction · 0.64
TestLengthEstimateFunction · 0.64
TestOptionalQuantityFunction · 0.64