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

Method Clone

interpreter/runtimecost.go:239–247  ·  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

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

Callers 3

computeCostFunction · 0.95
newProgramFunction · 0.95
InfoMethod · 0.80

Calls

no outgoing calls

Tested by 1

computeCostFunction · 0.76