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

Function listsRangeCostModel

ext/lists.go:1239–1244  ·  view source on GitHub ↗

listsRangeCostModel models lists.range(n): it builds n ints, each of size 1 under both built-in strategies.

(id string)

Source from the content-addressed store, hash-verified

1237// listsRangeCostModel models lists.range(n): it builds n ints, each of size 1 under both built-in
1238// strategies.
1239func listsRangeCostModel(id string) cost.OverloadModel {
1240 return cost.Overload(id,
1241 cost.EvalCost(cost.AllocList(cost.Length(cost.Result()))),
1242 cost.ResultSize(cost.List(cost.IntArg(0, math.MaxUint), cost.Const(1))),
1243 )
1244}
1245
1246func listReverseCostModel(id string) cost.OverloadModel {
1247 return cost.MemberOverload(id,

Callers 1

CompileOptionsMethod · 0.85

Calls 9

OverloadFunction · 0.92
EvalCostFunction · 0.92
AllocListFunction · 0.92
LengthFunction · 0.92
ResultFunction · 0.92
ResultSizeFunction · 0.92
ListFunction · 0.92
IntArgFunction · 0.92
ConstFunction · 0.92

Tested by

no test coverage detected