Skip to content

Store a job's iteration as the runner's iteration - #1576

Open
epompeii wants to merge 1 commit into
develfrom
u/ep/experiment/iteration
Open

epompeii wants to merge 1 commit into
develfrom
u/ep/experiment/iteration

Conversation

@epompeii

@epompeii epompeii commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

A remote job now stores 1 iteration for each run of the benchmark, not 1 for each output file.

Before, a job with --iter 3 and 2 --file paths stored 6 iterations, because each file of each run became its own iteration. Iteration k of a report now always means the runner's run k.

How

  • 1 group per run: each JsonIterationOutput becomes 1 stored iteration, under the runner's index.
  • The files of 1 run merge into it. Each file is parsed on its own, as before. The merge follows the job's --file order, not the output map's path order.
  • A value in 2 files of 1 run: the later file in --file order wins, and each replaced value is 1 Metric / Ignore report warning. Values with different keys all stay.
    • The key at BMF version 1 is benchmark, parameters, measure, and metric name.
    • The key at BMF version 0 is benchmark, parameters, and measure; the whole metric is replaced as 1 unit.
  • A benchmark the server names after the parse (one with no name of its own) is named in each file before the merge, so its value merges by the name it is stored under.
  • A run with no output keeps its number, so the next stored iteration keeps the runner's index.
  • Fold folds over the runs, not the files.
  • Labels: the text comment and bencher run label each iteration by its stored number.
  • Local runs do not change. bencher run without a runner and the run API's flat results field behave exactly as before; process_results keeps its signature, and the new process_iteration_results sits beside it.

Tests

Integration tests through the job completion path: 1 iteration per run with 2 files; a repeated value at BMF version 0 and version 1 with file names in reverse path order; different measures and different parameters both kept; fold over runs; a run with no results keeps its number; a repeated benchmark with no name of its own takes the later file; 1 file per run and stdout only unchanged. A unit test covers the per-measure cap after a merge, and a comment test covers labels with a gap in the numbers. Each new test was shown red on the old code or under a mutation.

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

ProjectBencher
Branchu/ep/experiment/iteration
Testbedintel-v1
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
microseconds (µs)
(Result Δ%)
Upper Boundary
microseconds (µs)
(Limit %)
Adapter::Json📈 view plot
🚷 view threshold
5.28 µs
(+1.54%)Baseline: 5.20 µs
5.47 µs
(96.45%)
Adapter::Magic (JSON)📈 view plot
🚷 view threshold
5.11 µs
(+1.61%)Baseline: 5.03 µs
5.29 µs
(96.67%)
Adapter::Magic (Rust)📈 view plot
🚷 view threshold
26.69 µs
(-0.58%)Baseline: 26.85 µs
28.64 µs
(93.19%)
Adapter::Rust📈 view plot
🚷 view threshold
4.65 µs
(+4.19%)Baseline: 4.47 µs
4.67 µs
(99.69%)
Adapter::RustBench📈 view plot
🚷 view threshold
4.63 µs
(+3.84%)Baseline: 4.46 µs
4.67 µs
(99.19%)
🐰 View full continuous benchmarking report in Bencher

@epompeii
epompeii marked this pull request as ready for review November 25, 2026 02:00
@epompeii
epompeii added this pull request to stack #1583 November 25, 2026 03:47
@epompeii
epompeii marked this pull request as draft December 1, 2026 19:07
@epompeii
epompeii force-pushed the u/ep/experiment/iteration branch from b9bb021 to fdb275b Compare December 1, 2026 19:07
A remote job that writes more than one output file stored one iteration per
file. Each run of the benchmark is now one iteration: its files parse one by
one and merge into it, in the order the job lists them, and a value that a
later file repeats replaces the earlier one with a report warning.
@epompeii
epompeii force-pushed the u/ep/experiment/iteration branch from fdb275b to 3cd34f4 Compare December 2, 2026 23:07
@epompeii
epompeii marked this pull request as ready for review December 3, 2026 00:30

This branch has not been deployed

No deployments
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