Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1602 +/- ##
============================================
+ Coverage 97.43% 97.47% +0.04%
- Complexity 981 993 +12
============================================
Files 211 211
Lines 2259 2299 +40
============================================
+ Hits 2201 2241 +40
Misses 58 58 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR introduces PHPBench benchmarking infrastructure to enable continuous performance monitoring. It adds the phpbench dependency, creates an initial benchmark suite for validators, and provides composer scripts to run benchmarks and generate performance profiles.
Changes:
- Added phpbench/phpbench as a dev dependency
- Created ValidatorBench.php with benchmarks for 70+ validators
- Added composer scripts for running benchmarks and generating profiles
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| tests/benchmark/ValidatorBench.php | New benchmark file testing validation performance across multiple validators |
| phpbench.json | Configuration file for phpbench runner settings |
| composer.json | Added phpbench dependency and composer scripts for benchmarking |
| .gitignore | Added phpbench cache directories to ignore list |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
henriquemoody
left a comment
There was a problem hiding this comment.
Wrote a few comments but having this here would be awesome as is
This commit is the first step in setting up *Continuous Performance* for the repository. - Adds phpbench/phpbench to dev dependencies. - Adds an initial `ValidatorBench.php` file with validate benchmarks for several validators. - Adds `composer bench` script to run benchmarks. - Adds `composer bench:profile` script to generate profiles.
This commit is the first step in setting up Continuous Performance for the repository.
ValidatorBench.phpfile with validate benchmarks for several validators.composer benchscript to run benchmarks.composer bench:profilescript to generate profiles.phpbench can do much more than how it is currently configured, but these are future steps. For now, it can help developers to catch performance and memory usage regressions.
The
composer bench:profile, in conjunction with tools likekcachegrindorwebgrind, is particularly useful to find hotspots and do more detailed analysis.Example benchmark profile loaded with kcachegrind: