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

Function trackSetsCost

ext/sets.go:247–254  ·  view source on GitHub ↗
(costFactor float64)

Source from the content-addressed store, hash-verified

245}
246
247func trackSetsCost(costFactor float64) interpreter.FunctionTracker {
248 return func(args []ref.Val, _ ref.Val) *uint64 {
249 lhsSize := actualSize(args[0])
250 rhsSize := actualSize(args[1])
251 cost := safeAdd(callCost, uint64(float64(lhsSize*rhsSize)*costFactor))
252 return &cost
253 }
254}

Callers 1

ProgramOptionsMethod · 0.85

Calls 2

safeAddFunction · 0.85
actualSizeFunction · 0.70

Tested by

no test coverage detected