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

Function networkToStringCostModel

ext/network.go:814–820  ·  view source on GitHub ↗

networkToStringCostModel models string(IP) and string(CIDR): formatted IPv6/CIDR strings are at most 45 characters.

(id string)

Source from the content-addressed store, hash-verified

812// networkToStringCostModel models string(IP) and string(CIDR): formatted IPv6/CIDR strings are at
813// most 45 characters.
814func networkToStringCostModel(id string) cost.OverloadModel {
815 return cost.Overload(id,
816 cost.EvalCost(cost.Const(cost.CallCost)),
817 cost.ResultSize(cost.AtMost(cost.Const(45))),
818 cost.BeforeVersion(1, cost.ManualCost(estimateNetworkNominalStringCost, trackNetworkNominalCost)),
819 )
820}
821
822func networkCIDROpaqueCostModel(id string) cost.OverloadModel {
823 return cost.MemberOverload(id,

Callers 1

CompileOptionsMethod · 0.85

Calls 7

OverloadFunction · 0.92
EvalCostFunction · 0.92
ConstFunction · 0.92
ResultSizeFunction · 0.92
AtMostFunction · 0.92
BeforeVersionFunction · 0.92
ManualCostFunction · 0.92

Tested by

no test coverage detected