|
31 | 31 | //! collapses into a single question this module asks of *that* data instead: |
32 | 32 | //! **for a given `TargetSubDAG`, does its candidate list contain anything |
33 | 33 | //! other than the trivial, no-op realization?** A `TargetSubDAG` whose only |
34 | | -//! candidate is "the one thing `SketchAlgorithmStrategy` would have committed |
| 34 | +//! candidate is "the one thing `ASAPStrategies` would have committed |
35 | 35 | //! to anyway, with no alternative" has no optimization to report — that |
36 | 36 | //! candidate isn't an *opportunity*, it's just the target's existing shape |
37 | 37 | //! reflected back. A `TargetSubDAG` with more than one candidate (several |
|
45 | 45 | //! - [`ExplanationKind::SketchApproximation`] — the `TargetSubDAG`'s |
46 | 46 | //! candidate list contains at least one summary-realization [`Replacement::SubDag`] that |
47 | 47 | //! actually realizes a sketch family (`FieldDataType::Sketch`), i.e. |
48 | | -//! [`SketchAlgorithmStrategy`] found something to offer beyond whatever |
| 48 | +//! [`ASAPStrategies`] found something to offer beyond whatever |
49 | 49 | //! exact/pass-through candidate [`crate::replacement`]'s own |
50 | 50 | //! `realizations_for_intent` would have committed to on its own. |
51 | 51 | //! - [`ExplanationKind::CommonSubexpressionReuse`] — the `TargetSubDAG` |
|
103 | 103 | //! [`ReplacementStrategy`] already *is* that extension point, one layer |
104 | 104 | //! down, and [`explain_replacements_with`]'s own `strategies` |
105 | 105 | //! parameter is where a caller plugs in a custom one (or a custom |
106 | | -//! `CostModel`, via [`crate::replacement::SketchAlgorithmStrategy::new`]) — the identical spot |
| 106 | +//! `CostModel`, via [`crate::replacement::ASAPStrategies::new`]) — the identical spot |
107 | 107 | //! [`crate::replacement::search_workload_with`] itself exposes. |
108 | 108 | //! |
109 | 109 | //! ## Two guarantees the old traversal made, re-verified against the new one |
|
176 | 176 | //! [`ReplacementSubDAG`]: crate::replacement::ReplacementSubDAG |
177 | 177 | //! [`Replacement`]: crate::replacement::Replacement |
178 | 178 | //! [`Replacement::SubDag`]: crate::replacement::Replacement::SubDag |
179 | | -//! [`SketchAlgorithmStrategy`]: crate::replacement::SketchAlgorithmStrategy |
| 179 | +//! [`ASAPStrategies`]: crate::replacement::ASAPStrategies |
180 | 180 | //! [`SharedSubDagStrategy`]: crate::replacement::SharedSubDagStrategy |
181 | 181 | //! [`CandidateLogicalASAPDAGs`]: crate::replacement::CandidateLogicalASAPDAGs |
182 | 182 | //! [`TargetSubDAGCandidates`]: crate::replacement::TargetSubDAGCandidates |
@@ -206,7 +206,7 @@ use crate::replacement::{ |
206 | 206 | pub enum ExplanationKind { |
207 | 207 | /// A `TargetSubDAG`'s candidate list contains at least one |
208 | 208 | /// [`Replacement::SubDag`] that realizes a sketch family — |
209 | | - /// [`crate::replacement::SketchAlgorithmStrategy`] found a genuine sketch |
| 209 | + /// [`crate::replacement::ASAPStrategies`] found a genuine sketch |
210 | 210 | /// alternative for this `Aggregate`, beyond whatever exact/pass-through |
211 | 211 | /// candidate `crate::replacement`'s own `realizations_for_intent` would |
212 | 212 | /// have committed to on its own. |
@@ -273,7 +273,7 @@ pub fn explain_replacements<Id: Display>( |
273 | 273 | /// instead of [`crate::replacement::default_strategies`] — the extension |
274 | 274 | /// point for a deployment-specific [`ReplacementStrategy`], or a custom |
275 | 275 | /// `CostModel` plugged into |
276 | | -/// [`crate::replacement::SketchAlgorithmStrategy::new`] (e.g. via |
| 276 | +/// [`crate::replacement::ASAPStrategies::new`] (e.g. via |
277 | 277 | /// [`crate::replacement::default_strategies_with`]). |
278 | 278 | /// |
279 | 279 | /// [`ReplacementStrategy`]: crate::replacement::ReplacementStrategy |
@@ -839,7 +839,7 @@ mod tests { |
839 | 839 | let q = agg(vec![2], default_quantile(0.99), metric_scan(&["job"])); |
840 | 840 | let custom_model = AlwaysDDSketch; |
841 | 841 | let strategies: Vec<Box<dyn ReplacementStrategy + '_>> = vec![Box::new( |
842 | | - crate::replacement::SketchAlgorithmStrategy::new(&custom_model), |
| 842 | + crate::replacement::ASAPStrategies::new(&custom_model), |
843 | 843 | )]; |
844 | 844 | let findings = explain_replacements_with(vec![("q", q)], &strategies); |
845 | 845 | assert_eq!(findings.len(), 1); |
|
0 commit comments