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

Method ActualCost

cel/program.go:157–163  ·  view source on GitHub ↗

ActualCost returns the tracked cost through the course of execution when `CostTracking` is enabled. Otherwise, returns nil if the cost was not enabled.

()

Source from the content-addressed store, hash-verified

155// ActualCost returns the tracked cost through the course of execution when `CostTracking` is enabled.
156// Otherwise, returns nil if the cost was not enabled.
157func (ed *EvalDetails) ActualCost() *uint64 {
158 if ed == nil || ed.costTracker == nil {
159 return nil
160 }
161 cost := ed.costTracker.ActualCost()
162 return &cost
163}
164
165// EvalResult encapsulates the response from a ConcurrentEval call.
166type EvalResult struct {

Callers 12

TestStringFormatFunction · 0.95
TestStringFormatV2Function · 0.95
testCostFunction · 0.45
testEvalWithCostFunction · 0.45
evalWithCELFunction · 0.45
TestStringCostTrackingFunction · 0.45
TestConcurrentEvalFunction · 0.45
TestCostLimitFunction · 0.45

Calls

no outgoing calls

Tested by 12

TestStringFormatFunction · 0.76
TestStringFormatV2Function · 0.76
testCostFunction · 0.36
testEvalWithCostFunction · 0.36
evalWithCELFunction · 0.36
TestStringCostTrackingFunction · 0.36
TestConcurrentEvalFunction · 0.36
TestCostLimitFunction · 0.36