Skip to content

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

Closed

Description

@zackees

Sub-task of #17 (foundational slice of phase BR-4). Follows BR-4a (#24).

Goal

Make the published benchmark data multi-platform-ready so Windows/macOS reld numbers can later land on the graph without ambiguity. Two concrete gaps in the current schema (v1):

  1. history.jsonl lines carry no target. Each line is {ts, sha, results} (ci/benchmark_stats.py:331-340). Once the benchmark runs on Linux + Windows + macOS, appended history lines are indistinguishable by OS — the series would collide. Add target (from meta["target"], e.g. x86_64-linux) to each line.
  2. No per-series engine mode. results entries are {scenario, series, seconds}. Add mode so a consumer can tell how reld ran: native (Linux, wild ELF engine) vs bridge (Windows/macOS, lld subprocess) vs reference (the competitor linkers bfd/lld/mold/wild).

Bump SCHEMA_VERSION 1 → 2.

Scope

ci/benchmark_stats.py + ci/tests/test_benchmark_stats.py only:

  • SCHEMA_VERSION = 2.
  • Helper series_mode(series: str, runner_os: str) -> str: "reference" for competitor linkers; for series == "reld", "native" if runner_os == "Linux" else "bridge".
  • write_outputs: each results entry gains "mode"; each history.jsonl line gains "target".
  • Tests: assert schema_version == 2; results entries include mode (competitors → reference); a direct unit test of series_mode for Linux/Windows/macOS; history line includes target.

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 any renderer/chart changes. This issue is schema + metadata only; the markdown table contract and chart rendering are untouched.

Done when

SCHEMA_VERSION == 2, latest.json results carry mode, history.jsonl lines carry target, series_mode is unit-tested, python -m pytest ci/tests -q is green. PR merged, issue closed, branch rebased on origin/main.

Activity

  1. added
    enhancement
    on Aug 7, 2026
  2. added a commit that references this issue on Aug 7, 2026
    0801bb8
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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions