runner: resolve benchmarks at runtime, drop the allowlist - #15
Merged
Conversation
Previously the controller maintained a per-repo allowlist and a hardcoded
`is_criterion_harness` match to decide how each benchmark ran and was
compared. Both drift as upstream adds suites (e.g. `run_tpch` is now
Criterion-harness-based upstream).
Resolve everything at runtime instead:
- For each requested benchmark, ask `cargo metadata` whether the name is a
real Criterion `[[bench]]` target. If so, run `cargo bench --bench <name>
--save-baseline <side>`; otherwise run it through `bench.sh` (TPC-H keeps
its direct `dfbench` shortcut).
- Always set `SQL_CARGO_COMMAND` on the bench.sh path — `bench.sh` only reads
it inside its SQL-harness run functions, so it's a no-op for the dfbench
suites and gives the harness suites a named baseline for `critcmp`.
- Drive comparison off the artifacts produced, not the name: `results/*.json`
-> `bench.sh compare_detail`; `target/criterion` baselines -> `critcmp`. A
mixed run emits both.
Drop the allowlist: any requested name is scheduled and resolved on the
runner (an unresolvable name fails there). `RepoEntry` now carries only
`kind` ("datafusion" | "arrow") and `default_standard`. `JobType`/`BenchType`
collapse Standard+Criterion into a single Datafusion variant (legacy
"standard"/"criterion" strings still map to it for in-flight rows); arrow is
unchanged. `bench_standard.rs` + `bench_criterion.rs` merge into
`bench_datafusion.rs`.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Owner
Author
|
Keeping up the whitelists has been a PITA. Let's try this out. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Follow-up to #13's review: the
bench_standardrunner hardcoded anis_criterion_harnessname match to decide how each benchmark was compared,and the controller maintained a per-repo allowlist (
standard/criterionname lists). Both drift as upstream evolves — e.g.
run_tpchis itselfCriterion-harness-based upstream now, and the SQL-harness suite set keeps
growing.
This implements the two asks from that thread:
What changed
Runtime resolution instead of name matching. For each requested
benchmark the runner asks
cargo metadatawhether the name is a realCriterion
[[bench]]target:cargo bench --bench <name> -- --save-baseline <side>.bench.sh run <name>(TPC-H keeps its directdfbenchshortcut).SQL_CARGO_COMMANDis now set unconditionally on the bench.sh path.bench.shonly reads it inside its SQL-harness run functions, so it's a no-opfor the dfbench suites and gives the harness suites (
wide_schema, …) a namedbaseline for
critcmp— no name list required.Comparison driven by artifacts, not names:
results/*.json→bench.sh compare_detail;target/criterionbaselines →critcmp. A runmixing both families emits both sections.
is_criterion_harnessis gone.Allowlist removed. Any requested name is scheduled and resolved on the
runner (a name that matches neither a Criterion target nor a
bench.shsuitefails there).
RepoEntrynow carries onlykind("datafusion"|"arrow")and
default_standard.JobType/BenchTypecollapseStandard+Criterioninto a single
Datafusionvariant (legacy"standard"/"criterion"stringsstill map to it for in-flight DB rows).
bench_standard.rs+bench_criterion.rsmerge into
bench_datafusion.rs;bench_arrow.rsis unchanged (separate repo).Deploy note
The
BENCHMARK_CONFIGschema changed (services/controller.ts), so thisneeds a Pulumi apply on deploy.
Testing
cargo fmt --check,cargo clippy --all-targets -- -D warnings, andcargo test(127 tests) all pass.🤖 Generated with Claude Code