Skip to content

feat(bench): benchmark JSON schema v2 — target in history, per-series mode (BR-4b) - #26

Merged
zackees merged 1 commit into
mainfrom
br4b-schema-v2
Aug 7, 2026
Merged

zackees merged 1 commit into
mainfrom
br4b-schema-v2

Conversation

@zackees

@zackees zackees commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Implements a foundational slice of BR-4 (#17). Closes #25. Follows BR-4a (#24).

What

Makes the published benchmark data multi-platform-ready — the prerequisite for putting Windows/macOS reld numbers on the graph without the series colliding.

  • history.jsonl lines now carry target (e.g. x86_64-linux). Previously each line was {ts, sha, results}; once the benchmark runs on Linux + Windows + macOS, the appended history would be indistinguishable by OS. Now it's keyed.
  • results entries gain a mode: native for reld on Linux (wild ELF engine), bridge for reld on Windows/macOS (lld subprocess), reference for the competitor linkers.
  • SCHEMA_VERSION 1 → 2.

Schema/metadata only. The markdown-table contract, the parser (parse_benchmark_log), and the chart renderers (render_jpg/render_html) are untouched — they consume Report.rows, never the JSON — so chart output is unaffected.

Compatibility

Nothing in the repo reads back existing history.jsonl content: write_outputs only appends raw text and re-truncates, and the workflow just curls the file down as bytes. Old lines (without target/mode) stay valid; new lines carry the extra fields. No published-series corruption risk.

Out of scope (later BR-4 slices)

The 3-OS workflow matrix, per-OS competitor sets, the Windows/macOS rustc-based reld bench path, and renderer/chart changes.

Testing

  • Scoped to ci/benchmark_stats.py + ci/tests/test_benchmark_stats.py. python -m pytest ci/tests -q → 13 passed.
  • New test_series_mode covers reld×{Linux,Windows,Darwin} and reference×{bfd,lld}; the write_outputs test asserts schema_version == 2 and mode presence; the history test asserts target in every line.
  • Rusqlite ci/e2e/sqlite-bridge regression e2e still links via reld and runs (OK, exit 0) — this change doesn't touch reld.

Review

Independent review returned APPROVE, confirming no history read-back / published-series corruption risk and that series_mode is correct for all real (series, os) combinations.

🤖 Generated with Claude Code

… mode (BR-4b)

Make the published benchmark data multi-platform-ready ahead of the 3-OS graph:
- history.jsonl lines now carry `target` (e.g. x86_64-linux), so once the
  benchmark runs on Linux/Windows/macOS the appended series don't collide.
- results entries gain a `mode`: reld is `native` on Linux (wild ELF engine)
  and `bridge` elsewhere (lld subprocess); competitors are `reference`.
- SCHEMA_VERSION 1 -> 2.

Schema/metadata only: the markdown-table contract, the parser, and the chart
renderer are untouched, and nothing reads back old history lines, so previously
published data stays valid.

Closes #25

Co-Authored-By: Claude Fable 5 <[email protected]>
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.

BR-4b (schema): benchmark JSON v2 — target in history, per-series engine mode

1 participant