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

Function MemoryLimit

cel/options.go:961–967  ·  view source on GitHub ↗

MemoryLimit enables memory tracking and configures program evaluation to exit early with a "memory limit exceeded" error if the peak tracked memory exceeds the limit. The MemoryLimit is a metric that corresponds to the aggregate element counts of the values observed during evaluation. It is indicat

(memLimit uint32)

Source from the content-addressed store, hash-verified

959// observed during evaluation. It is indicative of memory usage, not CPU usage; see CostLimit
960// for bounding compute.
961func MemoryLimit(memLimit uint32) ProgramOption {
962 return func(p *prog) (*prog, error) {
963 p.memoryLimit = &memLimit
964 p.evalOpts |= OptTrackMemory
965 return p, nil
966 }
967}
968
969// CostLimit enables cost tracking and sets configures program evaluation to exit early with a
970// "runtime cost limit exceeded" error if the runtime cost exceeds the costLimit.

Calls

no outgoing calls