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

Function WithSizingStrategy

common/cost/version.go:223–230  ·  view source on GitHub ↗

WithSizingStrategy sets the SizingStrategy used to resolve sizes during both cost estimation and runtime cost tracking. A nil strategy is ignored, leaving the default in place.

(strategy SizingStrategy)

Source from the content-addressed store, hash-verified

221//
222// A nil strategy is ignored, leaving the default in place.
223func WithSizingStrategy(strategy SizingStrategy) ModelOption {
224 return func(o *modelOptions) {
225 o.hasStrategy = true
226 if strategy != nil {
227 o.strategy = strategy
228 }
229 }
230}
231
232// ModelVersion pins the revision of the cost model's estimation and runtime tracking rules.
233//

Callers 14

buildMethod · 0.92
TestCustomSizingStrategyFunction · 0.92
TestVersion1RevisionsFunction · 0.85
estimateModelCostFunction · 0.85
trackModelCostFunction · 0.85
TestNewModelOptionsFunction · 0.85
TestLengthEstimateFunction · 0.85

Calls

no outgoing calls

Tested by 12

TestCustomSizingStrategyFunction · 0.74
TestVersion1RevisionsFunction · 0.68
estimateModelCostFunction · 0.68
trackModelCostFunction · 0.68
TestNewModelOptionsFunction · 0.68
TestLengthEstimateFunction · 0.68
TestOptionalTrackedSizeFunction · 0.68