Skip to content

Publish benchmark results to gh-benchmarks - #1

Merged
vincentsarago merged 19 commits into
mainfrom
feat/gh-benchmarks-report
Jul 31, 2026
Merged

Publish benchmark results to gh-benchmarks#1
vincentsarago merged 19 commits into
mainfrom
feat/gh-benchmarks-report

Conversation

@vincentsarago

Copy link
Copy Markdown
Member

Summary

  • Preserve commit_info/datetime and split service into its own field in both workflows' JSON output (cog, mosaic), so results are self-describing
  • Push cog/mosaic benchmark results to the gh-benchmarks branch on every push to main (gated to push events only — PR runs never get write access), via a hand-rolled fetch+rebase+retry push (no third-party action) plus a per-workflow concurrency group
  • Carries over some in-progress workflow cleanup that was already sitting uncommitted (drop unused pull-requests: write permission, dead commented-out github-action-benchmark block, stray debug echoes, fix "Merge Outputs" which was overwriting benchmark.json instead of writing siege_results.json)
  • A static index.html report (already pushed directly to gh-benchmarks, not part of this PR) fetches those JSON files client-side and renders latency bar charts + siege metric tables for both cog and mosaic, light/dark themed

Test plan

  • jq transforms verified locally against fixtures
  • YAML syntax validated after every edit
  • Report page verified in a real headless-browser run (Playwright) against fixture data, both light/dark prefers-color-scheme, including the "no data yet" fallback for missing files
  • First real workflow run after merge: confirm gh-benchmarks receives fresh cog/*.json and mosaic/*.json
  • Enable GitHub Pages (Settings → Pages → source: gh-benchmarks / root) and confirm the report renders real data

vincentsarago and others added 19 commits July 30, 2026 14:20
Covers persisting cog/mosaic benchmark JSON to the existing gh-benchmarks
branch and serving a static, client-side-rendered HTML dashboard from it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The committed benchmark.json is a bare array (commit_info/datetime were
already dropped by the existing jq pipe), not the raw pytest-benchmark
object as originally assumed. Wrap it to keep those fields for the report
header, and collapse the double jq pipe into one call.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Picks up in-progress edits: drop the unused pull-requests write
permission and the dead commented-out github-action-benchmark block,
remove stray "Parse Results" echo lines, and fix "Merge Outputs" which
was overwriting benchmark.json instead of writing siege_results.json.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Picks up in-progress edits: drop the unused pull-requests write
permission and the dead commented-out github-action-benchmark block,
add the benchmark.json jq extraction that was missing from "Run
Benchmark", remove stray "Parse Results" echo lines, and fix "Merge
Outputs" which was overwriting benchmark.json instead of writing
siege_results.json.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Matches the actual invocation used in benchmark-cog.yml (run from repo
root, not from within cog/).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The action does a single fetch+push with no retry/rebase-on-conflict,
so concurrent pushes from the cog and mosaic workflows (both can
trigger on the same pyproject.toml-touching commit) could race and
fail outright. A hand-rolled fetch+rebase+retry loop actually delivers
the safety this step needs.
Closes the residual push race the retry loop was built to handle: two
runs of this same workflow (e.g. two merged PRs in quick succession)
could otherwise still race on the same gh-benchmarks/cog/*.json files.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
git-auto-commit-action doesn't retry/rebase on push conflicts as the
original plan assumed; document the retry-loop + concurrency-group
replacement implemented during Task 6, and give Task 7 the corrected
pattern up front.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…om main

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The architecture summary and Task 8's verification note still
described the replaced action; update both to describe the retry-loop
push script actually in use.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vincentsarago
vincentsarago merged commit 01fca5a into main Jul 31, 2026
2 checks passed
@vincentsarago
vincentsarago deleted the feat/gh-benchmarks-report branch July 31, 2026 02:05
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