Skip to content

ci(bench): print per-OS performance stats in the job + verbose benchmark-stats branch publish #53

Closed

Description

@zackees

Summary

We already render the benchmark chart JPG and publish it to the benchmark-stats branch, but the run itself is quiet: the numeric performance stats are never printed in the job, and the step that force-pushes the benchmark-stats branch does so with almost no logging. Make the benchmark job print the per-OS performance stats to the log (and step summary), and make the branch-population verbose about what it's doing.

Context (benchmark-stats.yml / ci/benchmark_stats.py)

Per target (x86_64-linux, x86_64-pc-windows-msvc, aarch64-apple-darwin) we generate benchmark-link.jpg, index.html (a scenario × linker seconds table), latest.json, and history.jsonl, then the aggregate job's Publish benchmark-stats branch step git push --forcees them to the benchmark-stats branch. To see the actual numbers today you must open latest.json/index.html on that branch — the Actions run shows nothing, and the publish step just runs git commands with no narration of what branch is being (re)populated with what.

Proposal

  1. Print the stats in the job. After running the benchmark (and in aggregate), print a per-OS stats table to stdout and to $GITHUB_STEP_SUMMARY — median link time per scenario per linker (bfd/lld/mold/wild/reld), reld's speedup vs the reference (or n/a), plus the run metadata already in latest.json (timestamp, runner platform, pinned linker versions). Reuse the numbers ci/benchmark_stats.py already computes; add a --print/stdout rendering so the data is visible in the run, not only on the branch.
  2. Be verbose about populating the branch. The publish step should clearly log: which branch it targets (benchmark-stats), that it is a force-push of generated content, the list of per-target directories/files being published, the source git_sha, and a one-line "published N targets to ()" summary. Guard messaging should also state plainly when publish is skipped (e.g. on a PR / non-default branch) rather than silently doing nothing.

Acceptance criteria

  • Each benchmark run prints a readable per-OS performance-stats table to the job log and $GITHUB_STEP_SUMMARY (numbers visible without opening the branch).
  • Stats are rendered from latest.json / the existing benchmark_stats.py data (no new measurement) and include run metadata + n/a for unavailable linkers.
  • The publish step logs the target branch, that it is force-pushing generated content, the files/targets published, the source SHA, and a final summary line — and logs an explicit "skipping publish (not default branch)" when guarded off.
  • RED -> GREEN: a ci/tests check over the stats-printing path (e.g. benchmark_stats.py gains a stdout/summary renderer) that currently emits nothing, then prints the per-OS table from sample latest.json.

Decisions

  • Priority: P3. Observability improvement; the data and image publishing already work.
  • Source of truth is latest.json — pure rendering/logging change, no measurement changes.
  • No behavior change to what's published, only to what's printed and how loudly the publish is narrated.

Activity

  1. zackees commented on Aug 23, 2026

    @zackees
    CollaboratorAuthor

    Completed by #69 and proven in Benchmark Stats run 32668402943 at 58066f9.

    Each target now prints its performance table and metadata to the log and step summary. The aggregate reports the source SHA, generated files/targets, force-publish operation, destination, and final publish outcome; the non-default-branch path reports an explicit skip. The rendering/reporting path is covered by the benchmark-stats tests, and the production run published successfully.

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