Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[net]
git-fetch-with-cli = true
11 changes: 11 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions control_plane/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ tokio-stream = { version = "0.1", features = ["net"] }
promql_utilities.workspace = true
asap_types.workspace = true

# Transitional pin (docs/migration-plan-backend-plan.md Phase 1b): locked to a
# specific commit on ASAPController's main, not a tag -- ASAPController has no
# tagged releases yet. Re-pin as ASAPController's IR evolves; move to a tag
# once one exists.
asap-ir = { git = "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/ProjectASAP/ASAPController", rev = "c73c2a5099e3e0d0439e86d895f5a61a7e1231b1" }

[dev-dependencies]
tokio = { version = "1", features = ["full", "test-util"] }
tower = { version = "0.4", features = ["util"] }
Expand Down
54 changes: 39 additions & 15 deletions control_plane/src/asap_tier_analysis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,28 +353,52 @@ fn collect_agg_intents(expr: &QueryExpr, out: &mut Vec<AggIntent>) {
/// the AST walker can recover them; this fallback runs when the AST
/// walk fails.
fn intent_kind_label(intent: &AggIntent) -> &'static str {
if crate::intent_algebra::as_frequency(intent).is_some() {
return "frequency";
}
match intent {
AggIntent::Count { .. } => "count",
AggIntent::Sum => "sum",
AggIntent::Min => "min",
AggIntent::Max => "max",
AggIntent::Avg => "avg",
AggIntent::Sum { .. } => "sum",
AggIntent::Min { .. } => "min",
AggIntent::Max { .. } => "max",
AggIntent::Avg { .. } => "avg",
AggIntent::StdDev { .. } => "stddev",
AggIntent::Variance { .. } => "variance",
AggIntent::Quantile { .. } => "quantile",
AggIntent::TopK { .. } => "topk",
AggIntent::Cardinality { .. } => "cardinality",
AggIntent::Frequency { .. } => "frequency",
AggIntent::Rate { .. } => "rate",
AggIntent::Increase { .. } => "increase",
AggIntent::Rate => "rate",
AggIntent::Increase => "increase",
AggIntent::Absent => "absent",
AggIntent::Present => "present",
AggIntent::Delta { .. } => "delta",
AggIntent::Deriv { .. } => "deriv",
AggIntent::AbsentOverTime => "absent_over_time",
AggIntent::PresentOverTime => "present_over_time",
AggIntent::Delta => "delta",
AggIntent::Deriv => "deriv",
AggIntent::PredictLinear { .. } => "predict_linear",
AggIntent::HoltWinters { .. } => "holt_winters",
AggIntent::Idelta { .. } => "idelta",
AggIntent::Irate { .. } => "irate",
AggIntent::Resets { .. } => "resets",
AggIntent::Changes { .. } => "changes",
AggIntent::DoubleExpSmoothing { .. } => "double_exponential_smoothing",
AggIntent::IDelta => "idelta",
AggIntent::Resets => "resets",
AggIntent::Changes => "changes",
AggIntent::HistogramCount => "histogram_count",
AggIntent::HistogramSum => "histogram_sum",
AggIntent::HistogramAvg => "histogram_avg",
AggIntent::HistogramStdDev => "histogram_stddev",
AggIntent::HistogramStdVar => "histogram_stdvar",
AggIntent::HistogramFraction { .. } => "histogram_fraction",
AggIntent::HistogramQuantile { .. } => "histogram_quantile",
AggIntent::Math(_) => "math",
AggIntent::TimeFn(_) => "time_fn",
AggIntent::Group => "group",
AggIntent::CountValues { .. } => "count_values",
AggIntent::LastOverTime => "last_over_time",
AggIntent::FirstOverTime => "first_over_time",
AggIntent::MadOverTime => "mad_over_time",
AggIntent::TsOfMinOverTime => "ts_of_min_over_time",
AggIntent::TsOfMaxOverTime => "ts_of_max_over_time",
AggIntent::TsOfFirstOverTime => "ts_of_first_over_time",
AggIntent::TsOfLastOverTime => "ts_of_last_over_time",
// Unrecognized Extension (not the Frequency one, guarded above).
AggIntent::Extension { .. } => "extension",
}
}

Expand Down
Loading