1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

22 Commits

Author SHA1 Message Date
Máté Kocsis
df1a90eadc Update config options for real-time benchmark
Valgrind based instruction count is no longer available, but two debugging related options were recently added.
2026-01-29 22:21:37 +01:00
Máté Kocsis
5f367b8a01 Fix artifact URL for scheduled real-time benchmark workflows
[skip ci]
2026-01-24 23:11:54 +01:00
Máté Kocsis
b17b699c69 Yet another minor real-time benchmark improvements
Changes include:
- Enable parallelism for the scheduled and manual workflows
- Change length of commit hashes in order to align with GitHub's behavior
- Remove unnecessary cleanup step

[skip ci]
2026-01-19 23:18:19 +01:00
Máté Kocsis
7722a9a797 Support parallel benchmark runs & some tweaks
This commit changes the following:
- The "workspace" and "state_bucket" config options are given so that the benchmark will use a seperate state per environment ("workspace" per the benchmark's terminology) via the Terraform remote state feature. As a side-effect, cancelling a workflow run won't mess up the AWS account by leaving dangling components; everything will be properly destroyed and then recreated during the next run.
- The displayed GitHub compare link always truncates the commit hashes to 6 characters
- Some code simplification

[skip ci]
2026-01-18 23:43:46 +01:00
Máté Kocsis
03ca08948d Fix variable interpolation in the real-time benchmark workflow
[skip ci]
2026-01-17 21:59:59 +01:00
Máté Kocsis
146b535a6d Add additiona information for the real-time benchmark results
[skip ci] The following additional information will be visible:
- workflow run URL
- workflow run artifact URL
- changeset diff
2026-01-17 15:14:10 +01:00
Máté Kocsis
d136b214d1 Fix the real time benchmark artifact glob pattern
[skip-ci]
2026-01-15 10:54:07 +01:00
Máté Kocsis
02159c16b5 Do not measure instruction count by default on the scheduled runs
It makes the benchmark faster to execute. And this metric is not that useful anyway.

[skip-ci]
2026-01-15 10:54:07 +01:00
Máté Kocsis
3d418eb35b Remove the opcache option from the real-time benchmark workflow
It's not needed anymore since it's now always turned on, and the exact usage (whether to use --enable-opcache or not) is automatically detected: 0b116647c7

[skip-ci]
2026-01-14 18:21:50 +01:00
Máté Kocsis
c65adbaed0 Various improvements for the Real time benchmark (#20930)
- Ubuntu is updated to 24.04
- Log files are also uploaded as artifact
- The baseline commit is now correctly set to the merge base commit when the workflow is manually started on a PR
2026-01-14 08:41:38 +01:00
Tim Düsterhus
874727b41f Update GitHub Action workflows to actions/upload-artifact@v6 (8.5) 2025-12-17 15:31:27 +01:00
Tim Düsterhus
872c9bd41d Update GitHub Action workflows to actions/checkout@v6 (8.5) 2025-12-17 15:30:44 +01:00
Máté Kocsis
cf33fd70ad Fix fallback value handling in the real-time benchmark
"{{ inputs.opcache || '1' }}" doesn't work the way I used to think: I assumed it only falls back to 1 if the input is not set (when a scheduled workflow runs). So this bug is fixed by overwriting the env vars in bash in case of manual workflows.
2025-08-19 08:27:40 +02:00
Máté Kocsis
96990f451d Update real-time benchmark config
- Do not run micro_bench.php by default (it would take a very long time to get accurate results)
- Measure instruction count by default during the scheduled runs
2025-08-19 07:49:28 +02:00
Tim Düsterhus
359f4420a4 Merge branch 'PHP-8.4'
* PHP-8.4:
  Update GitHub Action workflows to `actions/checkout@v5`
2025-08-13 19:10:23 +02:00
Máté Kocsis
98e0dbcefe Opcache is always available in the previous commit of the real time benchmark
Now that there's one measured run after opcache is always enabled, we can change the PHP_OPCACHE back to 1.
2025-08-03 21:00:19 +02:00
Máté Kocsis
55a3e33bb1 Do not allow concurrent runs of the real time benchmark
Closes GH-19345
2025-08-01 11:38:30 +02:00
Máté Kocsis
776d6f8660 Add valgrind instruction count meansurement support to manual benchmark flow 2025-08-01 11:34:31 +02:00
Máté Kocsis
e8f88e746b Fixes the real time benchmark
First of all, the last successful build had been before opcache was made required - therefore the PHP_OPCACHE setting should be 2 to manually enable it.

Then, the manual flow should comment on the PR of the triggering repo (github.repository), not the repo of the benchmarked code (env.REPOSITORY).
2025-08-01 10:12:38 +02:00
Máté Kocsis
ada10741b4 Add support for manually running the real-time benchmark on PRs (#19265)
[skip-ci]
2025-07-31 22:51:38 +02:00
Máté Kocsis
e48099a03c Update real-time benchmark config after opcache became mandatory
https://wiki.php.net/rfc/make_opcache_required removed the --enable-opcache option, and this change creates a problem for the benchmark: the master branch (containing the RFC implementation) cannot use the deprecated options and config anymore, while earlier versions must still use them.

Therefore, the benchmark had to introduce the PHP_OPCACHE=2 config value (3455b34856) to signal that opcache still has to be manually enabled. After the next benchmark run,  PHP_OPCACHE for the previous PHP version has to be switched back to "1".

[skip-ci]
2025-07-29 00:16:37 +02:00
Máté Kocsis
2448a01a55 Add real-time benchmark to CI as a nightly job (#15696)
This PR integrates https://github.com/kocsismate/php-version-benchmarks/ into the CI as a nightly job running every day at 12:30 AM UTC. Roughly, the following happens: the benchmark suite spins up an AWS EC2 instance via Terraform, runs the tests according to the configuration, and then the results are committed to the https://github.com/kocsismate/php-version-benchmark-results repository.

In order to have as stable results as possible, the CPU, kernel and other settings of the AWS instance are fine-tuned:

- Hyper-threading is disabled
- Turbo boost is disabled
- C states of the CPU are limited: https://docs.aws.amazon.com/linux/al2/ug/processor_state_control.html#baseline-perf
- The workload is dedicated to a single core by using taskset according to Intel's recommendations (https://web.archive.org/web/20210614053522/https://01.org/node/3774)
- An io2 SSD volume is attached to the instance which has a provisioned IOPS (https://docs.aws.amazon.com/ebs/latest/userguide/provisioned-iops.html#io2-block-express) so that IO performance is nearly constant
- The instance is dedicated so that the noisy neighbor effect is eliminated: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-instance.html
- ASLR is disabled (Disable ASLR for benchmark #13769)

Customizing the CPU is only supported by metal instances among recent instance types according to https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/processor_state_control.html, so at last, a c7i.metal-24xl instance is used in the eu-west-1 region.

The benchmark suite compares the performance of the latest commit of the master branch in the time when the benchmark runs with the last commit of master from the day before yesterday. I.e. if the benchmark runs tomorrow morning at 2 AM, then the performance of the latest commit will be benchmarked against the last commit pushed yesterday. This makes it possible to spot outstanding regressions (or progressions) in time. Actually, the end goal is to send notifications in case of any significant changes for further analyzation. The reason why the benchmark is run for previous commits as well (while they may have already been measured the day before) is to make the results less sensitive for changes in the environment or the benchmark suite itself. I.e.: if AWS upgrades the OS, or if the code under test is modified, then the numbers will likely be affected, and the previous results will be invalidated).
2024-09-25 15:55:24 +02:00