CostTracking enables cost tracking and registers a ActualCostEstimator that can optionally provide a runtime cost estimate for any function calls.
(costEstimator cost.ActualCostEstimator)
| 929 | |
| 930 | // CostTracking enables cost tracking and registers a ActualCostEstimator that can optionally provide a runtime cost estimate for any function calls. |
| 931 | func CostTracking(costEstimator cost.ActualCostEstimator) ProgramOption { |
| 932 | return func(p *prog) (*prog, error) { |
| 933 | p.callCostEstimator = costEstimator |
| 934 | p.evalOpts |= OptTrackCost |
| 935 | return p, nil |
| 936 | } |
| 937 | } |
| 938 | |
| 939 | // MemoryTracking enables peak memory tracking during evaluation with an optional set of |
| 940 | // types.MemoryTrackerOption values to configure the tracker's size calculator, sample |
no outgoing calls