Skip to content
Open
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
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,13 +302,16 @@ dot -Tsvg target/readme-evidence/selected.dot \
-o target/readme-evidence/selected.svg
```

Candidate discovery accepts the checked-in unquoted templates. Deployment and
selected-plan inspection require `ASAPQUERY_PLANNING_SNAPSHOT` to point to a
snapshot with complete, valid workload cost evidence. Prepare that input using
the [cost evidence workflow](docs/examples/workload-cost-evidence.md).
There is one snapshot compiler: it compares complete executable alternatives,
including exact fallback. Materialization IDs are definitions, not physical SIDs.
For `--metricsql`, collect quotes for the MetricsQL frontend.
Candidate discovery and deployment accept snapshots without external workload
quotes. The backend combines applicable ERP resources or analytical estimates
with data size, query frequency and physical-plan structure, then compares
complete candidate costs, including exact fallback. The selected plan includes
the resource breakdown and assumptions in `cost_comparison`.

Point `ASAPQUERY_PLANNING_SNAPSHOT` to your workload snapshot with current data
and capability inputs. Optional calibrated provider quotes can override automatic
costing through the [cost evidence workflow](docs/examples/workload-cost-evidence.md).
Materialization IDs are definitions, not physical SIDs.

## Prometheus runbook

Expand Down
11 changes: 10 additions & 1 deletion control_plane/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ fn compile_physical_plan_request(
)
}
},
None => frontend.compile(compilation_request, environment),
None => physical::workload_cost::select_candidates(candidates, environment, None, frontend),
};
let bundle = match compiled {
Ok(bundle) => bundle,
Expand Down Expand Up @@ -986,6 +986,15 @@ mod api_tests {
let (plan, collectors, _, _, _) =
compile_physical_plan_request(request, false, QueryFrontend::PromQl).unwrap();
let plan = plan.unwrap();
let report = plan
.cost_comparison
.as_ref()
.expect("HTTP must compare automatically priced candidates");
assert_eq!(report.model_version, "backend-workload-resources-v2");
assert!(report
.candidate_evaluations
.iter()
.any(|candidate| candidate.automatic_cost.is_some()));
assert!(collectors.is_empty());
assert!(plan.collector_plans.is_empty());
assert_eq!(
Expand Down
Loading
Loading