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

Method CreateMap

common/cost/tracker.go:197–200  ·  view source on GitHub ↗

CreateMap records map literal construction cost.

(id int64, res ref.Val)

Source from the content-addressed store, hash-verified

195
196// CreateMap records map literal construction cost.
197func (c *Tracker) CreateMap(id int64, res ref.Val) {
198 c.cost = SafeAdd(c.cost, MapCreateBaseCost)
199 c.checkLimit()
200}
201
202// CreateStruct records struct/object construction cost.
203func (c *Tracker) CreateStruct(id int64, res ref.Val) {

Callers 3

ExecMethod · 0.80
trackCostCreateMapFunction · 0.80

Calls 2

checkLimitMethod · 0.95
SafeAddFunction · 0.85

Tested by 1