trackStringSplitCost tracks runtime cost for string split operations, accounting for traversal and list allocation.
(args []ref.Val, result ref.Val)
| 1069 | // trackStringSplitCost tracks runtime cost for string split operations, |
| 1070 | // accounting for traversal and list allocation. |
| 1071 | func trackStringSplitCost(args []ref.Val, result ref.Val) *uint64 { |
| 1072 | traversalCost := float64(safeAdd(actualSize(args[0]), 1)) * stringCostFactor |
| 1073 | resultSize := actualSize(result) |
| 1074 | cost := safeAdd(callCost, uint64(math.Ceil(traversalCost)), resultSize, common.ListCreateBaseCost) |
| 1075 | return &cost |
| 1076 | } |
| 1077 | |
| 1078 | // trackStringJoinCost tracks runtime cost for string join operations, |
| 1079 | // accounting for traversal and the size of the result. |
nothing calls this directly
no test coverage detected