Registry Mirror
Skip to content

Conversation

@headtr1ck

@headtr1ck headtr1ck commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

When the run-benchmark (or topic-performance) label is set, the benchmark workflow now also posts its results as a comment on the PR. Later runs update the same comment.

  • benchmarks.yml writes the comment: the asv compare table of the changed benchmarks, with emoji instead of asv's markers (🚀 better, 🐌 worse, 💥 now failing, 🩹 fixed, 🤷 not comparable) and a (slightly funny) title depending on whether benchmarks got better, worse, both, or did not change.
  • The new benchmarks-comment.yml posts it as github-actions[bot]. This needs a separate workflow_run workflow, because pull_request runs from forks cannot write to the PR (same approach as publish-test-results.yaml). The comment comes from the PR's own run, so it is only posted on the PR whose head commit was benchmarked.

workflow_run workflows only run from the default branch, so this can only be tested after merging. I tested the comment generation locally with real asv results. Example (the real comment links to the specific workflow run):

⚡ Zoom zoom! Some benchmarks improved.

Change Before [031b74f] After [68e1988] Ratio Benchmark (Parameter)
🚀 737M 309M 0.42 cov_corr.CovCorrDask.peakmem_cov_corr('corr')
🚀 711M 246M 0.35 cov_corr.CovCorrDask.peakmem_cov_corr('cov')

🚀 better · 🐌 worse · 💥 now failing · 🩹 fixed · 🤷 not comparable

Comparing 68e19887 (this PR merged into the base branch) with 031b74fd (base branch).
Only changes by more than a factor of 1.5 are shown, see the workflow run for all results.

AI Disclosure

  • This PR contains AI-generated content.
    • I have tested any AI-generated content in my PR.
    • I take responsibility for any AI-generated content in my PR.
    • Tools: Claude Code with Opus 5.5

🤖 Generated with Claude Code

The benchmark job now writes a summary of `asv compare` with a title depending on
whether benchmarks got better, worse or both. A separate workflow_run workflow
posts it as a comment, because pull_request runs from forks cannot write to the
PR. It only comments on the PR whose head commit was benchmarked.

Co-authored-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the Automation Github bots, testing workflows, release automation label Oct 6, 2026
@headtr1ck headtr1ck added the run-benchmark Run the ASV benchmark workflow label Oct 6, 2026
headtr1ck and others added 2 commits October 6, 2026 23:35
Also count fixed benchmarks (*) as better and stop counting not comparable
benchmarks (x) as worse.

Co-authored-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@headtr1ck headtr1ck added the plan to merge Final call for comments label Oct 7, 2026
@headtr1ck
headtr1ck merged commit 1392c84 into pydata:main Oct 7, 2026
59 checks passed
@headtr1ck
headtr1ck deleted the benchmark-pr-comment branch October 7, 2026 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Automation Github bots, testing workflows, release automation plan to merge Final call for comments run-benchmark Run the ASV benchmark workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant