[php-src] PR #24189: Allow custom PHP code in the real-time benchmark workflow
| From: | LamentXU123 | Date: | Thu, 08 Oct 2026 08:57:42 +0000 |
| Subject: | [php-src] PR #24189: Allow custom PHP code in the real-time benchmark workflow | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-39247@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/24189
Author: LamentXU123
We have a real-time benchmark workflow which can benchmark the different 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 workflow (or expose a already exist feature from https://github.com/kocsismate/php-version-benchmarks/commit/d29cbb9954037c3368e02fd9981b85c3bb77fe78)
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.