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

Function networkCIDRLength

ext/network.go:839–841  ·  view source on GitHub ↗

networkCIDRLength returns the bounded length of a CIDR receiver (at most 16 bytes), which bounds the estimate for a receiver of unknown size without changing the runtime charge.

()

Source from the content-addressed store, hash-verified

837// networkCIDRLength returns the bounded length of a CIDR receiver (at most 16 bytes), which bounds
838// the estimate for a receiver of unknown size without changing the runtime charge.
839func networkCIDRLength() cost.QuantityExpr {
840 return cost.Min(cost.Length(cost.Target()), cost.Const(16))
841}
842
843// networkCIDRCompareCost returns the address comparison cost for a CIDR receiver, which reads the
844// CIDR twice and therefore scans at twice StringCostFactor.

Calls 4

MinFunction · 0.92
LengthFunction · 0.92
TargetFunction · 0.92
ConstFunction · 0.92

Tested by

no test coverage detected