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

Method CreateStruct

common/cost/tracker.go:203–206  ·  view source on GitHub ↗

CreateStruct records struct/object construction cost.

(id int64, res ref.Val)

Source from the content-addressed store, hash-verified

201
202// CreateStruct records struct/object construction cost.
203func (c *Tracker) CreateStruct(id int64, res ref.Val) {
204 c.cost = SafeAdd(c.cost, StructCreateBaseCost)
205 c.checkLimit()
206}
207
208// EvalAttribute records attribute resolution cost (ident / select).
209func (c *Tracker) EvalAttribute(id int64, isTestOnly bool, res ref.Val) {

Callers 3

ExecMethod · 0.80
trackCostCreateStructFunction · 0.80

Calls 2

checkLimitMethod · 0.95
SafeAddFunction · 0.85

Tested by 1