Skip to content

Add support for manually running the real-time benchmark on PRs #19265

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 31, 2025

Conversation

kocsismate
Copy link
Member

@kocsismate kocsismate commented Jul 27, 2025

No description provided.

@kocsismate kocsismate requested a review from TimWolla as a code owner July 27, 2025 13:23
@kocsismate kocsismate force-pushed the benchmark-manual-workflow branch from 3de527f to a233037 Compare July 27, 2025 17:39
@kocsismate kocsismate changed the title Add support for manually runnung the real-time benchmark on PRs Add support for manually running the real-time benchmark on PRs Jul 28, 2025
@kocsismate kocsismate force-pushed the benchmark-manual-workflow branch from a233037 to 64751de Compare July 29, 2025 06:12
Copy link
Member

@iluuu1994 iluuu1994 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not currently using this benchmark but if the workflow works well for direct comparisons that seems useful!

required: true
type: string
commit:
description: 'Commit SHA that is going to be benchmarked (e.g. "123456789a")'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just use ref and baseline_ref? This can be either a branch, tag, commit, etc.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly, this could even request just the PR number instead of repository, branch, commit, baseline_commit; as we can determine all of these from the PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The branch and the commit is needed for various reasons, mostly displaying them. However, I love the idea of gathering these info automatically from github CLI 😍 I'm about to finish the implementation.

One caveat is that originally I planned that the workflow could be run for branches, tags, or even for master. A required PR number input will prevent these use-cases, but I think the 99% of usecases are still covered, so I'm fine with the loss.

fetch-depth: 100
path: 'php-version-benchmarks/tmp/php_master'
path: 'php-version-benchmarks/tmp/php_${{ env.BRANCH }}'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could probably drop the dynamic path suffix _${{ env.BRANCH }} here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left the suffix there so that the directory name matches the PHP ID (master for scheduled, benchmarked for the manual flow). It's probably not strictly needed but this makes it easier to see what PHP version the directory relates to.

@kocsismate kocsismate marked this pull request as draft July 29, 2025 10:13
@kocsismate
Copy link
Member Author

@iluuu1994 Thanks for looking into it! I have managed to start testing the manual workflow on my own repo. I implemented some fixes there, but unfortunately a separate issue (github rate limit) blocks it from finishing successfully, so I have to take care of this problem first. Afterwards, I'll update this PR :)

@kocsismate
Copy link
Member Author

kocsismate commented Jul 30, 2025

Successful test workflow run: https://github.com/kocsismate/php-src/actions/runs/16633526468/job/47068814288
Test comment: kocsismate#8 (comment)

The PR is updated. (I fixed the bug with not benchmarking the baseline version without JIT after the comment was made)

@kocsismate kocsismate marked this pull request as ready for review July 30, 2025 14:59
@kocsismate kocsismate force-pushed the benchmark-manual-workflow branch from 6e2de73 to a70d9b1 Compare July 30, 2025 21:28
@kocsismate kocsismate force-pushed the benchmark-manual-workflow branch from a70d9b1 to 965368a Compare July 30, 2025 21:32
@kocsismate
Copy link
Member Author

@iluuu1994 Can I ask you to trigger the workflow using this branch in order to test it on php-src as well? And I think you could supply this PR as input if you don't have any better PR that would benefit from some benchmark.

@iluuu1994
Copy link
Member

@kocsismate I don't think I can. The workflow trigger button won't show up until the action is configured in the default branch.

@kocsismate
Copy link
Member Author

Ah yes, I forgot that the manual workflow setting needs to be merged first 🫤

@kocsismate
Copy link
Member Author

Let me merge this, because it would (hopefully) fix the scheduled benchmark that will run in a few hours. It has been failing for quite a few days now. I happily accept after the fact reviews anytime!

@kocsismate kocsismate merged commit ada1074 into php:master Jul 31, 2025
9 checks passed
@kocsismate kocsismate deleted the benchmark-manual-workflow branch August 1, 2025 07:15
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.

3 participants