Skip to content

planeval: run the use cases through ASAPPlanner's planner and executor, replacing the single-query planeval - #233

Merged
GordonYuanyc merged 7 commits into
mainfrom
phase2-ver4
Oct 31, 2026
Merged

GordonYuanyc merged 7 commits into
mainfrom
phase2-ver4

Conversation

@GordonYuanyc

@GordonYuanyc GordonYuanyc commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

What changes

aqpbm-planeval now runs recurring PromQL use-case queries through ASAPPlanner's own planner and executor, in process, and measures how faithfully each approximate plan preserves the application's decisions. It replaces the single-query planeval on main. The old one is pinned to ASAPPlanner 3c31338, depends on asap-aware-mapping (gone from planner main), and executes the DAG with its own hand-written executor.

  • Planning and execution: aqpbm-planeval (binary planeval), pinned to ASAPPlanner main b822553. It runs the specs in aqpbm-planeval/workloads/ for use cases 1, 2, 4 and 5 at every evaluation time.
  • Sketch bounds: for every planned sketch, asap_sketchlib's capability (which statistics it answers, merged-error semantics) and analytics (theoretical error bound, memory, update, query and merge operations).
  • Application fidelity: scripts/run_use_case.py with threshold_alert.py, decision.py, rollout.py and topk_set.py.
  • Grafana: generated dashboards under tools/grafana/, including an overview table that puts sketchlib's bound and memory next to the measured error and the planner's predicted memory.

Removed

  • The old aqpbm-planeval sources.
  • configs/datagen/planeval_promql_leaf.yaml and configs/datagen/planeval_cluster_metrics.yaml, used only by it.

Verification

  • cargo build --release --workspace
  • cargo test -p aqpbm-planeval --release: 4/4 pass; clippy clean.
  • python3 -m unittest discover -s scripts: 170 pass.
  • python3 scripts/run_use_case.py 4 --arm noraw-eps0.01

🤖 Generated with Claude Code

GordonYuanyc and others added 7 commits October 30, 2026 15:17
… fidelity in Grafana

aqpbm-inprocess plans each query of a use-case spec with ASAPPlanner
(bb981e9b) and runs the installed plan with its executor at every
evaluation time, refreshing materialized views as the planner's own
runtime test does. Use case 1 (SYN flood: entropy and distinct counts of
source IPs) runs an exact arm and seven approximate arms.

scripts/ turns the answers into query_result rows, derives the threshold
alert and its fidelity metrics, and writes them for the Grafana dashboard
in tools/grafana. docs/approx-bench-use-cases.md holds the five use cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dashboard

Pin ASAPPlanner to main 41c51546. Specs now describe many labeled
series per metric, phased changes, and request streams whose values
become labels; use case 1 draws the same samples as before.

Add the comparison alert (use case 4), autoscaler decision (use case 2)
and top-k set (use case 5) applications, a single run_use_case.py entry
point, and a dashboard generator with decision, topk and overview
dashboards.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each application now writes exact, approx and annotation strips per
evaluation (onset delay, gap, end delay, false positive, decision delay)
and reports true/false positives and negatives.

- Use case 1: end delay, measured as a mean absolute value.
- Use case 2: scaling actions once per crossing, matched within two
  evaluations; down rule at 0.4 cores and 0.75 GB.
- Use case 4: rollout controller over fixed 10-check rollouts replaces
  the comparison alert; canary at 5% of samples; new rollout dashboard.
- Use case 5: exact and approx capped strips per client.
- Per-container and per-client data files so the decision and top
  clients dashboards load quickly.
- docs/approx-bench-use-cases.md updated to the current use case doc.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Use case 2 matches the closest same-kind exact and approx actions
  first, so the result no longer depends on processing order.
- Grouped stat queries return nothing on empty input instead of an
  Infinity error.
- Per-container and per-client panels read files through hidden
  variables that always name an entity in the selected run.
- Split run data rejects entity names that collide when case is
  ignored, and reads only JSON files.
- The overview shows use case 5 agreement as mean overlap, with
  identical lists in the fidelity text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd analytics for every planned sketch

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…case runner

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…os in plain short sentences

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@GordonYuanyc
GordonYuanyc merged commit 85b756c into main Oct 31, 2026
2 checks passed
@GordonYuanyc
GordonYuanyc deleted the phase2-ver4 branch October 31, 2026 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant