Introduce PHPBench and move performance tests from AnalyserIntegrationTest to RegressionBench#5200
Conversation
|
You've opened the pull request against the latest branch 2.2.x. PHPStan 2.2 is not going to be released for months. If your code is relevant on 2.1.x and you want it to be released sooner, please rebase your pull request and change its target to 2.1.x. |
phpbench.json
Outdated
| "$schema":"./vendor/phpbench/phpbench/phpbench.schema.json", | ||
| "runner.bootstrap": "vendor/autoload.php", | ||
| "runner.path": "tests/bench", | ||
| "runner.file_pattern": "*Bench.php", | ||
| "storage.xml_storage_path": "tests/bench/storage" |
7dbfe21 to
f3bf719
Compare
f3bf719 to
a029b04
Compare
| ini-file: development | ||
| ini-values: memory_limit=-1 | ||
|
|
||
| - uses: "ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520" # v3 |
Check warning
Code scanning / zizmor
detects commit SHAs that don't match their version comment tags Warning
| ini-values: memory_limit=-1 | ||
|
|
||
| - uses: "ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520" # v3 | ||
| - uses: "ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520" # v3 |
Check warning
Code scanning / zizmor
detects commit SHAs that don't match their version comment tags Warning
| ini-file: development | ||
| ini-values: memory_limit=-1 | ||
|
|
||
| - uses: "ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520" # v3 |
Check warning
Code scanning / zizmor
detects commit SHAs that don't match their version comment tags Warning
| ini-values: memory_limit=-1 | ||
|
|
||
| - uses: "ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520" # v3 | ||
| - uses: "ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520" # v3 |
Check warning
Code scanning / zizmor
detects commit SHAs that don't match their version comment tags Warning
bf0e688 to
c058fb3
Compare
Each testBug method now has a comment on its first line describing the nature of the original issue: crash, performance, infinite run, false positive, or false negative. https://claude.ai/code/session_017EKgzxmzYFa1qUT8bcuohj
Extract shared container/config infrastructure from PHPStanTestCase into PHPStanTestCaseTrait so it can be reused by both PHPUnit tests and phpbench benchmarks without duplication. Add AbstractBenchCase with runAnalyse method for writing performance benchmarks. https://claude.ai/code/session_017EKgzxmzYFa1qUT8bcuohj
…sts/bench/ The $container variable in the bootstrap closure is used by bootstrap files at runtime. Moved AbstractBenchCase from tests/PHPStan/Benchmark/ to tests/bench/ and updated composer.json classmap accordingly. https://claude.ai/code/session_017EKgzxmzYFa1qUT8bcuohj
Move 32 performance regression tests from AnalyserIntegrationTest to a new RegressionBench class using phpbench. Test data files moved to tests/bench/data/. This separates performance benchmarks from functional integration tests. https://claude.ai/code/session_017EKgzxmzYFa1qUT8bcuohj
phpbench stores local benchmark results in .phpbench/ which are machine-specific and should not be committed. https://claude.ai/code/session_017EKgzxmzYFa1qUT8bcuohj
…ute and PHP 7.4 does not like that
25b48ba to
753fecf
Compare
Each testBug method now has a comment on its first line describing
the nature of the original issue: crash, performance, infinite run,
false positive, or false negative.
https://claude.ai/code/session_017EKgzxmzYFa1qUT8bcuohj