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

Function StringScan

common/cost/model.go:927–929  ·  view source on GitHub ↗

StringScan creates an expression representing the cost of scanning a string.

(expr QuantityExpr)

Source from the content-addressed store, hash-verified

925
926// StringScan creates an expression representing the cost of scanning a string.
927func StringScan(expr QuantityExpr) QuantityExpr {
928 return Scale(expr, StringTraversalCostFactor)
929}
930
931// ListAlloc creates an expression representing list allocation cost with base cost and scaled element count.
932func ListAlloc(elemCount QuantityExpr, costFactor float64) QuantityExpr {

Callers 15

stringTransformEvalCostFunction · 0.92
stringCharAtCostModelFunction · 0.92
stringSearchCostModelFunction · 0.92
listJoinCostModelFunction · 0.92
listJoinStringCostModelFunction · 0.92
stringReplaceCostModelFunction · 0.92
stringSplitCostModelFunction · 0.92
base64EncodeCostModelFunction · 0.92
base64DecodeCostModelFunction · 0.92
networkParseCostModelFunction · 0.92

Calls 1

ScaleFunction · 0.85

Tested by 6

TestValidateRejectionsFunction · 0.68
TestQuantityExprs_TrackFunction · 0.68