FunctionTrackerWithOptions returns a FunctionTracker implementing the cost model, configured by the supplied options. ModelVersion applies to tracking as it does to estimation, so that a call's estimate and its charge are computed by the same rules.
(opts ...ModelOption)
| 1266 | // ModelVersion applies to tracking as it does to estimation, so that a call's estimate and its |
| 1267 | // charge are computed by the same rules. |
| 1268 | func (m OverloadModel) FunctionTrackerWithOptions(opts ...ModelOption) FunctionTracker { |
| 1269 | resolved := newModelOptions(opts...) |
| 1270 | return m.buildTracker(resolved.strategy, resolved.version) |
| 1271 | } |
| 1272 | |
| 1273 | func (m OverloadModel) buildTracker(strategy SizingStrategy, version uint32) FunctionTracker { |
| 1274 | if prior, ok := priorForVersion(m.priors, version); ok { |