Repository navigation
Description
Context
The published benchmark currently compares three generated C workload sizes (small (16 units), medium (128 units), and large (512 units)). The large synthetic workload compiles quickly enough that maintaining three size tiers adds presentation and harness complexity without giving us three meaningfully different projects. The more useful dimension is how the final link changes across an idiomatic Rust application's build configurations.
The repository already has the right workload in ci/e2e/sqlite-bridge: a small, cross-platform two-crate Rust workspace using serde, serde_json, anyhow, and bundled SQLite. It is already exercised through reld on Windows and macOS. The pinned Rust 1.94.1 toolchain supports rustc --print link-args; a local probe confirmed that it emits the complete target-native final Windows link invocation, including Rust objects/rlibs, bundled SQLite, system libraries, and output flags.
Proposal
Replace the three size-based benchmark rows with exactly three configurations of that one project:
no-LTOThinLTOfull-LTO
For each configuration, compile the workspace once outside the timed loop, capture the actual final linker invocation with cargo rustc ... -- --print link-args, and replay only that invocation for every expected linker on the current platform. Remove the prior output before every trial, report the median after warmup, and execute every final artifact to require the fixture's OK marker.
Keep one independently published chart per OS. Preserve the existing strict expected-linker coverage, exact-source-SHA and freshness gates, plus honest reld mode/engine metadata. Give this benchmark shape a new schema/workload identity and discard incompatible size-based history instead of appending mode rows to it.
Acceptance criteria
- RED -> GREEN: focused tests first demonstrate that the current runner emits size-based scenarios and cannot capture/replay the idiomatic Rust project's three final links; implementation turns those tests green.
-
ci/e2e/sqlite-bridgeis the only benchmark workload; no separate small/medium/large projects and no Bevy corpus are introduced. - The benchmark output contains exactly
no-LTO,ThinLTO, andfull-LTO, in that order, for Linux, Windows MSVC, and macOS ARM64. - Each configuration is compiled exactly once before timing; every warmup/trial replays only the captured target-native final link invocation with the selected linker.
- Every linked output is nonempty, executes successfully, and prints the fixture's
OKmarker outside the timed interval. - Every currently expected per-platform linker remains measured in all three configurations; missing, duplicate, unexpected, or
n/acells fail coverage. -
latest.jsonretains explicit measured status and truthfulnative/bridgeplus concrete engine metadata; old size-based history is not mixed with the new workload identity. - README charts/prose describe the single Rust workload and three LTO configurations.
- GitHub Actions remains Bash-only. Each job performs one
uv sync --extra dev, then invokes Python tooling withuv run --no-sync ...; no PowerShell or bare Python invocation is added. - Python/Rust tests, formatting, lint, actionlint, and the managed Linux bosn task pass locally.
- A feature-branch
benchmark-stats.ymldispatch passes all three native runners, aggregation, strict coverage, and artifact verification without publishing; after merge, a main dispatch publishes exact-SHA artifacts and passes the remote freshness gate.
Decisions
- Priority: P2. This replaces the primary public performance signal and must remain trustworthy across all three platforms.
- Reuse
sqlite-bridge. It is already idiomatic, dependency-bearing, cross-platform, and end-to-end proven; adding another fixture would duplicate maintenance. - Time only the final link. Cargo/rustc performs each configuration's compilation and LTO setup before measurement. The benchmark compares the resulting final links; compiler optimization/WPO time is deliberately excluded.
- Keep the existing linker sets. The captured final inputs are target-native link inputs, so the current reference linkers and reld can all be measured without expected
n/acells. - Replace, do not multiply, charts. There remain three charts total—one per OS—with configuration replacing synthetic size on the x-axis.
- Reset incompatible history. A new benchmark workload/schema identity prevents old size rows and new LTO rows from sharing a time series.
Related issues
- bench: frozen Bevy link corpus — compile once per platform, replay the link every iteration #55 is strongly related but its frozen Bevy workload is superseded by the single small-project decision here.
- bench: quick-link / thin-LTO / full-LTO sections over the frozen corpus (link only, no compile in the loop) #56 is strongly related but its Bevy/frozen-corpus presentation is superseded by replacing the existing size rows in-place.
- meta: frozen linker-object benchmark assets — benchmark-assets branch(es) + manifest.json (compile once, link every iteration) #57 supplied reusable capture/replay concepts, but its large published-asset storage layer is not required for this small project.
Activity
feat(bench): benchmark one Rust project across LTO modes (#71)