Skip to content

bench-external: showcase-1m and showcase-1h suites and the plan step - #262

Merged
GordonYuanyc merged 6 commits into
mainfrom
bench-external/showcase-suite
Nov 24, 2026
Merged

GordonYuanyc merged 6 commits into
mainfrom
bench-external/showcase-suite

Conversation

@zzylol

@zzylol zzylol commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

What this adds

The first comparison run needs committed public workloads, and a step that plans each one per engine variant into a bench-external run directory. This PR adds two synthetic suites and that step.

Example:

ASAP_PLANNER=target/release/asap_planner scripts/plan-suite.sh suites/showcase-1h /data/run-1
approxbench bench-external run --run-dir /data/run-1 --lane <lane> --variant clickhouse.equivalent-only

plan-suite.sh copies each <w>.workload.json into workloads/ and runs asap_planner --plan-file once per variant:

Variant Capabilities Executor check substitutions_allowed
clickhouse.equivalent-only capabilities/clickhouse.equivalent-only.json skip false
clickhouse.with-substitutes capabilities/clickhouse.with-substitutes.json skip true
asap.default planner defaults compile true
asap.exact defaults; every target {"max_error": 0.0, "failure_probability": 0.0} compile false

When the planner selects no plan, the step writes <w>.no-plan.json with the planner's error line as the reason.

Suites

Suite Windows Evaluated every Data
showcase-1m 1 m 10 s 10 min
showcase-1h 1 h 60 s 70 min
  • Both suites have the same eight shapes: quantile, quantile with rank error, sum of rate, avg of quantile, count, max, sum_over_time, and all five of these together.
  • Every metric has 1,000 series (job 10 × instance 100) at 1 s samples.
  • Each <w>.planner.json declares the generated data's facts, including distinct_values_per_label and the summed rows_per_second.

Planned with ASAPPlanner (deployment exclusions plus --plan-file), all 64 (workload, variant) pairs get a plan:

  • showcase-1m: every variant plans query-time scans.
  • showcase-1h: sum, count, max and rate plan as stored exact windows. The one exception is rate under clickhouse.equivalent-only, which plans at query time, because a stored rate is a substitute there.
  • Quantiles stay query-time scans in both suites.
  • asap.default selects the same plans as asap.exact.

QueryLanguage::MetricsQl is added, so a suite kept outside the repository can carry MetricsQL texts.

Interfaces

 pub enum QueryLanguage {
     PromQl,
     Sql,
+    MetricsQl,
 }
+suites/<suite>/<w>.workload.json, suites/<suite>/<w>.planner.json
+scripts/plan-suite.sh <suite-dir> <run-dir>   (ASAP_PLANNER env)

Design scope

New item Scope Why it is general
suites/ public benchmark inputs, a pair of files per workload any lane reads a WorkloadSpec, and the planner reads its own workload
scripts/plan-suite.sh the plan step of bench-external writes the run-dir layout that run_lane reads; the variants are a table in the script
QueryLanguage::MetricsQl harness workload language the planner has a MetricsQL frontend

Tests

aqpbm-core/tests/harness_suites.rs runs on every committed suite. For each workload it checks:

  • the spec parses, and has a schedule whose first evaluation falls on the planner's phase;
  • query ids are q1..qN, and the texts and intervals equal the planner workload's;
  • every range in a text equals window_ms, and every grouping label exists in the data;
  • the data matches the planner's facts: series count, sample interval, counter kind, distinct values per label, value sign and rows_per_second.

It also round-trips MetricsQl through serde. cargo test -p aqpbm-core and clippy are clean.

Not in this PR

Hand-written ClickHouse views per shape, the VictoriaMetrics variants, and running identical plan files once.

@zzylol
zzylol requested a review from GordonYuanyc November 17, 2026 14:26
@zzylol zzylol added the enhancement New feature or request label Nov 17, 2026
@zzylol
zzylol force-pushed the bench-external/run-slice branch from af7fa57 to 671d399 Compare November 17, 2026 16:46
@zzylol
zzylol force-pushed the bench-external/showcase-suite branch 3 times, most recently from b5e1ebc to 493f4f9 Compare November 17, 2026 18:37
@zzylol
zzylol force-pushed the bench-external/run-slice branch from 31a0040 to 7c0d121 Compare November 17, 2026 20:13
@zzylol
zzylol force-pushed the bench-external/showcase-suite branch from 493f4f9 to 602155b Compare November 17, 2026 20:13
Base automatically changed from bench-external/run-slice to main November 19, 2026 09:40
zzylol and others added 6 commits November 24, 2026 16:21
… system-bench capabilities path

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

q1_quantile -> quantile, q1r_quantile_rank -> quantile_rank,
q2_sum_rate -> sum_rate, q3_avg_quantile -> avg_quantile, q4_count ->
count, q4b_max -> max, q4c_sum_over_time -> sum_over_time, q5_joint ->
joint: the names main gave the same workloads in system-bench's fixtures.
Each workload's name field follows its file name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@GordonYuanyc
GordonYuanyc force-pushed the bench-external/showcase-suite branch from 602155b to 4722b96 Compare November 24, 2026 21:28
@GordonYuanyc
GordonYuanyc marked this pull request as ready for review November 24, 2026 21:49
@GordonYuanyc
GordonYuanyc merged commit d0ce356 into main Nov 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants