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

Function estimateListSort

ext/lists.go:1137–1144  ·  view source on GitHub ↗

estimateListSort estimates l.sort() under ModelVersion0.

(t *types.Type, legacy bool)

Source from the content-addressed store, hash-verified

1135
1136// estimateListSort estimates l.sort() under ModelVersion0.
1137func estimateListSort(t *types.Type, legacy bool) cost.FunctionEstimator {
1138 return func(estimator cost.Estimator, target *cost.AstNode, args []cost.AstNode) *cost.CallEstimate {
1139 if target == nil || len(args) != 0 {
1140 return nil
1141 }
1142 return estimateSelfCompareCost(estimator, *target, *target, t, legacy, false)
1143 }
1144}
1145
1146// estimateListSortBy estimates l.sortBy() under ModelVersion0.
1147func estimateListSortBy(u *types.Type, legacy bool) cost.FunctionEstimator {

Callers 1

listSortCostModelsFunction · 0.85

Calls 1

estimateSelfCompareCostFunction · 0.85

Tested by

no test coverage detected