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

Method Clone

interpreter/runtimecost.go:242–250  ·  view source on GitHub ↗

Clone makes a shallow copy of the tracker. The different clones can be used independently from each other.

()

Source from the content-addressed store, hash-verified

240// The different clones can be used independently from
241// each other.
242func (c *CostTracker) Clone() (*CostTracker, error) {
243 tracker := &CostTracker{
244 Estimator: c.Estimator,
245 overloadTrackers: c.overloadTrackers,
246 Limit: c.Limit,
247 presenceTestHasCost: c.presenceTestHasCost,
248 }
249 return tracker, nil
250}
251
252// ActualCost returns the runtime cost
253func (c *CostTracker) ActualCost() uint64 {

Callers 14

computeCostFunction · 0.95
newProgramFunction · 0.95
InfoMethod · 0.80
ExtendMethod · 0.80
ensureMutableFeaturesMethod · 0.80
ensureMutableLimitsMethod · 0.80
FunctionsMethod · 0.80
VariablesMethod · 0.80
MacrosMethod · 0.80

Calls

no outgoing calls

Tested by 1

computeCostFunction · 0.76