Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

phpbench: added composer scripts for recording/comparing a baseline #38

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.private/
.php_cs.cache
.phpunit.result.cache
.phpbench/
Gherkin
infection.log
per-mutator.md
Expand Down
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@
"phpunit": "vendor/bin/phpunit",
"psalm": "vendor/bin/psalm",
"uptodocs": "docs/testdocs",
"benchmark-baseline": "phpbench run benchmarks --report=aggregate --tag=original --retry-threshold=5",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this script would generate a baseline and store its runtimes

"benchmark-compare-baseline": "phpbench run benchmarks --report=aggregate --ref=original --retry-threshold=5",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after a baseline has been saved using composer benchmark-baseline one can then invoke composer benchmark-compare-baseline which then indicates relativ differences compared to the baselined performance scores

"benchmark": "phpbench run benchmarks --report=aggregate"
}
}