Skip to content

PHPBench: use custom report format#5789

Merged
staabm merged 3 commits into
phpstan:2.2.xfrom
staabm:bench-format
Jun 1, 2026
Merged

PHPBench: use custom report format#5789
staabm merged 3 commits into
phpstan:2.2.xfrom
staabm:bench-format

Conversation

@staabm
Copy link
Copy Markdown
Contributor

@staabm staabm commented May 30, 2026

to ease reading the very long and information loaded table, I think it would be helpful if the summary table would contain less data (and therefore better fit into the github actions log viewer). the line break because of long lines, makes it hard to read.

atm we have a lot of redundant information (see screen below)


report before this PR:

grafik
  • all tests have the same benchmark name (same string in column1 for all rows)
  • all tests have the same subject name (same string in column2 for all rows)
  • all tests have the same revs (same string in column4 for all rows)
  • all tests have the same its (same string in column5 for all rows)

report after PR:

➜  phpstan-src git:(2.2.x) ✗ make phpbench
tests/bench/storage/local-baseline.xml
XDEBUG_MODE=off tests/vendor/bin/phpbench run --file=tests/bench/storage/local-baseline.xml --report=my-report
PHPBench (1.5.1) running benchmarks... #standwithukraine
with configuration file: /Users/staabm/workspace/phpstan-src/phpbench.json
with PHP version 8.3.31, xdebug ❌, opcache ❌
comparing [actual vs. ]

\PHPStan\Benchmark\RegressionBench

    benchRunAnalyse # and-chain-truthy-blow.I4 ✔ [Mo118.006ms vs. Mo118.105ms] -0.08% (±0.68%)
    benchRunAnalyse # bug-1388.php..........I4 ✔ [Mo61.760ms vs. Mo62.238ms] -0.77% (±1.65%)
    benchRunAnalyse # bug-1447.php..........I4 ✔ [Mo12.732ms vs. Mo12.928ms] -1.52% (±1.20%)
    benchRunAnalyse # bug-3686.php..........I4 ✔ [Mo7.092ms vs. Mo7.132ms] -0.56% (±4.43%)

Subjects: 1, Assertions: 4, Failures: 0, Errors: 0
+-----------------------------+------------------+------------------+----------------+
| set                         | mem_peak         | mode             | rstdev         |
+-----------------------------+------------------+------------------+----------------+
| and-chain-truthy-blowup.php | 63.300mb -11.47% | 116.480ms -1.38% | ±2.33% +87.79% |
| bug-1388.php                | 70.667mb -0.26%  | 60.115ms -3.41%  | ±1.23% -35.56% |
| bug-1447.php                | 67.936mb 0.00%   | 12.825ms -0.80%  | ±0.77% +38.14% |
| bug-3686.php                | 67.476mb 0.00%   | 7.093ms -0.55%   | ±0.93% -54.37% |
...

@staabm staabm requested review from VincentLanglet, Copilot and ondrejmirtes and removed request for Copilot May 31, 2026 06:28
@staabm staabm merged commit 8ef3b5d into phpstan:2.2.x Jun 1, 2026
392 checks passed
@staabm staabm deleted the bench-format branch June 1, 2026 09:31
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.

2 participants