FunctionEstimatorWithOptions returns a FunctionEstimator implementing the cost model, configured by the supplied options. Unset options take their defaults: the default SizingStrategy and the latest model revision.
(opts ...ModelOption)
| 1209 | // by the supplied options. Unset options take their defaults: the default SizingStrategy and the |
| 1210 | // latest model revision. |
| 1211 | func (m OverloadModel) FunctionEstimatorWithOptions(opts ...ModelOption) FunctionEstimator { |
| 1212 | resolved := newModelOptions(opts...) |
| 1213 | return m.buildEstimator(resolved.strategy, resolved.version) |
| 1214 | } |
| 1215 | |
| 1216 | func (m OverloadModel) buildEstimator(strategy SizingStrategy, version uint32) FunctionEstimator { |
| 1217 | if prior, ok := priorForVersion(m.priors, version); ok { |