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

Function stringSearchCostModel

ext/strings.go:919–923  ·  view source on GitHub ↗
(id string)

Source from the content-addressed store, hash-verified

917}
918
919func stringSearchCostModel(id string) cost.OverloadModel {
920 return cost.MemberOverload(id,
921 cost.EvalCost(cost.Sum(cost.Const(cost.CallCost), cost.StringScan(cost.Mul(cost.Length(cost.Target()), cost.Length(cost.Arg(0)))))),
922 )
923}
924
925func stringFixedTransformCostModel(id string) cost.OverloadModel {
926 return cost.MemberOverload(id,

Callers 1

CompileOptionsMethod · 0.85

Calls 9

MemberOverloadFunction · 0.92
EvalCostFunction · 0.92
SumFunction · 0.92
ConstFunction · 0.92
StringScanFunction · 0.92
MulFunction · 0.92
LengthFunction · 0.92
TargetFunction · 0.92
ArgFunction · 0.92

Tested by

no test coverage detected