Skip to content

feat(bench): replace size scenarios with one Rust project's LTO configurations #70

Closed

Description

@zackees

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:

  1. no-LTO
  2. ThinLTO
  3. full-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-bridge is the only benchmark workload; no separate small/medium/large projects and no Bevy corpus are introduced.
  • The benchmark output contains exactly no-LTO, ThinLTO, and full-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 OK marker outside the timed interval.
  • Every currently expected per-platform linker remains measured in all three configurations; missing, duplicate, unexpected, or n/a cells fail coverage.
  • latest.json retains explicit measured status and truthful native/bridge plus 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 with uv 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.yml dispatch 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/a cells.
  • 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions