Visitar URL original
Allow custom PHP code in the real-time benchmark workflow by LamentXU123 · Pull Request #24189 · php/php-src · GitHub
Skip to content

Allow custom PHP code in the real-time benchmark workflow - #24189

Open
LamentXU123 wants to merge 1 commit into
php:masterfrom
LamentXU123:bench
Open

LamentXU123 wants to merge 1 commit into
php:masterfrom
LamentXU123:bench

Conversation

@LamentXU123

@LamentXU123 LamentXU123 commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

We have a real-time benchmark workflow which can benchmark the difference before and after a PR to measure performance improvements. However, Most of the performance PR focus on a specific function. Those PRs produce little difference in huge frameworks' benchmark (and often arguably within noise) The idea of this PR is to add a feature to the workflow (or expose a already exist feature from kocsismate/php-version-benchmarks@d29cbb9) which allows us to run custom code in real-time benchmark of a PR.

Let's say a PR claims to improve performance of str_contains. Than we can run

<?php
$haystack = str_repeat("abcdef", 1024) . "needle";

for ($i = 0; $i < 100000; $i++) {
    $result = str_contains($haystack, "needle");
}

in that workflow to see real-time benchmark results to check the improvments.

If the custom_code field is empty, than we go back to the original real-time workflow. Only maintainers with push permittions are able to run this workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant