Skip to content

test: --save pipeline check for the per-framework results layout - #1035

Closed
MDA2AV wants to merge 4 commits into
mainfrom
test-save-per-framework
Closed

test: --save pipeline check for the per-framework results layout#1035
MDA2AV wants to merge 4 commits into
mainfrom
test-save-per-framework

Conversation

@MDA2AV

@MDA2AV MDA2AV commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Pipeline test for #1034 — please don't merge until we've looked at the result.

Branched from per-framework-results, so its tree already has the per-framework results layout. The framework change itself is small and real (apt list cleanup + --no-install-recommends in bjoern's image layer), so the run has something legitimate to build.

What we're checking

A --save run should update only site/data/results/bjoern.json — specifically its baseline-512 and baseline-4096 keys (currently baseline-512 = 12,390 rps) — and touch no other framework's file. Under the old layout this would have rewritten site/data/baseline-512.json and baseline-4096.json, which every framework shares.

How it has to be triggered

/benchmark comments run pr-commands.yml from the default branch, which then dispatches benchmark-pr.yml also from the default branch. So commenting here would run main's commit step (staging the old flat paths) against this branch's scripts (writing per-framework files) — it would save nothing and prove nothing.

To exercise #1034's own workflow code, dispatch it explicitly against that branch:

gh workflow run benchmark-pr.yml --ref per-framework-results \
  -f pr=<this PR number> -f framework=bjoern -f profile=baseline -f save=true

It still requires your approval on the runner environment before anything executes.

Once #1034 is merged this stops being necessary — benchmark-pr.yml already merges main into the PR branch on --save runs, so ordinary /benchmark comments pick the new layout up automatically.

🤖 Generated with Claude Code

MDA2AV added 4 commits July 24, 2026 22:09
Closes #751. Results lived in 52 shared arrays — site/data/<profile>-<conns>.json,
each holding every framework — so a saved run rewrote files that every other
framework also occupies. They now live one file per framework:

  site/data/baseline-512.json    [ {actix…}, {hyper…}, … ]        ->
  site/data/results/actix.json   { framework, results: { "baseline-512": {…} } }

108 files, 1941 rows, same rows verbatim.

The conflict is real but narrower than "any two saves": git merges
non-adjacent hunks fine, so two frameworks updating existing rows usually
merge. It bites when rows are *inserted* — two contributors each adding a
framework, which is exactly when a rebase is most annoying. Reproduced both
ways against the real data:

  old layout, actix + hyper update rows      merges cleanly
  old layout, two new frameworks added       CONFLICT in baseline-512 and -4096
  new layout, the same two new frameworks    merges cleanly, both files present

Rows are copied verbatim rather than reshaped, which makes the migration
provable: regenerating data.js before and after gives a byte-identical file.
That is the main guarantee here — the board, the composite and every archived
round see exactly what they saw before.

Consumers:

  rebuild_site_data.py   writes each framework's file; a run touches only the
                         frameworks it benchmarked (verified: benchmarking
                         actix + hyper modified 2 of 108 files)
  gen_leaderboard_data   loads site/data/results/*.json once and rebuilds the
                         per-profile view, sorted by framework name so the
                         emitted data.js does not churn
  compare.sh             one read of the framework's own file instead of a
                         scan of every profile file
  archive.sh             regroups into the existing round shape, so
                         rounds/*.json keeps its current format
  benchmark-pr.yml       stages only site/data/results/<slug>.json

The filename is the display_name lowercased with anything outside
[A-Za-z0-9._-] replaced by '-', because two gateway entries are named
"aspnet-minimal + nginx" and "+ caddy".

.gitignore's `results/` rule was unanchored and silently swallowed the new
directory — the first attempt committed the code and none of the data. It is
now `/results/`, which is the raw benchmark output it was always meant to
cover; the root directory is still ignored.

scripts/migrate_results_layout.py is kept rather than deleted: it re-derives
the layout from a flat checkout, which is what a branch predating this needs
in order to rebase.

Note for #1020, which edits rebuild_site_data.py and deletes rows from the
flat files: it will need a rebase, and running the migration script after
merging main is the mechanical way to do it.
The step already declared env: GH_TOKEN at the end, so adding a second env:
block for FRAMEWORK produced two env keys in one step. PyYAML accepts that
silently (last one wins), which is why the local check passed, but GitHub
rejects the whole file: 'env is already defined'. Merged into the existing
block, and validated all six workflows with a loader that errors on duplicate
keys rather than quietly dropping one.
@MDA2AV

MDA2AV commented Jul 24, 2026

Copy link
Copy Markdown
Owner Author

Closing — this was branched off per-framework-results before #1034 merged, so it carries every one of those changes instead of just the framework tweak. Superseded by a clean one-file branch off current main.

@MDA2AV MDA2AV closed this Jul 24, 2026
@MDA2AV
MDA2AV deleted the test-save-per-framework branch July 24, 2026 21:19
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.

1 participant