Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ permissions:

concurrency:
group: benchmarks-${{ github.ref }}
# Keep each merged revision; the default single pending run replaces its predecessor.
queue: max
cancel-in-progress: false

jobs:
Expand Down
4 changes: 4 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -797,6 +797,10 @@ EP/JC/P work; candidates are not speedup claims until measured on both platforms

## Benchmark publication follow-up

- [x] Preserve up to 100 pending main benchmark runs instead of replacing the previous pending
merge's measurement; keep active runs and exact revision identities.
- [ ] Reconcile missing main measurements after queue cancellation or overflow against retained
reports and source artifacts; backfill only missing revisions, without replacing existing data.
- [ ] Retain separate macOS and Linux HTML reports plus raw JSON, with commit, build,
hardware/runner and measurement-contract identities. Local temporary previews are not release assets.
- [ ] Publish post-merge reports as official results and pre-merge reports as labeled PR previews.
Expand Down
14 changes: 14 additions & 0 deletions docs/benchmark-comparisons.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,20 @@ local history is needed.
Use the [historical backfill workflow](benchmark-backfill.md) to build and measure a frozen revision
list in one host session, with a common driver and reference-tool set.

## Retaining measurements for successive merges

Each merge into `main` requests its own post-merge measurement. The `Benchmarks` workflow
serializes runs for the same ref with `queue: max` and `cancel-in-progress: false`. This keeps
up to 100 pending runs alongside the active run. GitHub's default `queue: single` replaces
an older pending run when a newer merge arrives, even when cancellation of the active run
is disabled. See [GitHub's concurrency queue rules](https://docs.github.com/en/actions/how-tos/write-workflows/choose-when-workflows-run/control-workflow-concurrency).

The queue is bounded: additional runs are canceled once 100 are pending. This change does not
recover earlier canceled runs or guarantee measurement completion after runner or workflow
failures. Use the [backfill workflow](benchmark-backfill.md) for missing revisions. Queue order
also does not establish revision order; retained reports keep their exact commit and run identity.
PR measurements and publication use their own concurrency policies.

## Relative performance and advisory alarm

Each shape also has a CPU-grouped ratio table for participants doing the same task. It shows
Expand Down
15 changes: 15 additions & 0 deletions docs/performance-analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -4970,3 +4970,18 @@ manual metadata reconciliation continues normally. API failures still fail rathe
than masquerading as obsolete data. Fresh previews pay one bounded source/PR API check;
no fixed elapsed-time improvement is claimed. Old queued workflow definitions retain
their original steps, and rejected producer events still need independent recovery.

### Post-merge measurement queue admission

Main benchmark run `42354657340` for merge `1278c8943a6abd236a2f20e3937cc8e23a0f95a7`
was automatically canceled while pending when the next main merge requested a run. The workflow
already disabled active-run cancellation, but omitted `queue`, whose default permits only one
pending run. This loses a requested revision before measurement and is separate from CPU-count
agreement, runner performance, and publication backlogs. No agent cancellation caused this event.

Use `queue: max` for the existing per-ref main measurement concurrency group, keeping
`cancel-in-progress: false`. A committed workflow regression checks all three properties.
GitHub permits up to 100 pending runs; overflow still cancels additional requests. Existing
canceled revisions need explicit reconciliation/backfill, not a claim that changing the workflow
recovered them. Measurement commands, sampling, CPU selection, artifact identity, PR checks and
publication policies are unchanged. There is no runtime or elapsed-time improvement claim.
7 changes: 7 additions & 0 deletions tools/benchmark_history_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,13 @@ def test_comparisons_are_rendered_and_bound_to_head_binary(self):
with self.assertRaisesRegex(ValueError, "head binary"):
history.retain(Path(directory), value, source(2))

def test_main_measurement_queue_preserves_pending_merged_revisions(self):
workflow = repository_file('.github/workflows/benchmarks.yml').read_text()
concurrency = workflow.split('\nconcurrency:\n', 1)[1].split('\njobs:', 1)[0]
self.assertIn('group: benchmarks-${{ github.ref }}', concurrency)
self.assertRegex(concurrency, r'(?m)^ queue: max$')
self.assertRegex(concurrency, r'(?m)^ cancel-in-progress: false$')

def test_workflow_keeps_measurement_unprivileged_and_publication_serialized(self):
measure = repository_file(".github/workflows/benchmarks.yml").read_text()
shard_action = repository_file(".github/actions/benchmark-measure/action.yml").read_text()
Expand Down
Loading