-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
base: main
Are you sure you want to change the base?
Conversation
phpbench.json
Outdated
@@ -1,3 +1,4 @@ | |||
{ | |||
"bootstrap": "vendor/autoload.php" | |||
"bootstrap": "vendor/autoload.php", | |||
"xml_storage_path": "/tmp/.phpbench/storage" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with this line the baseline generated data is stored within the system temp dir.
that way we can easily checkout a different git branch without loosing data, which would otherwise be stored within the current repo folder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would keep this in <project root>.phpbench
and add it to .gitignore
if it's not already -- it's useful for various PHPBench artifacts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx for your input! adjusted per feedback
@@ -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", |
There was a problem hiding this comment.
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
@@ -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", | |||
"benchmark-compare-baseline": "phpbench run benchmarks --report=aggregate --ref=original --retry-threshold=5", |
There was a problem hiding this comment.
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
I am in the process of building a phpbench baseline compare feature as a github action workflow.
to get it running, we need this composer scripts merged into the main branch firsts.
could you please squash and merge this commits.
in the end the goal is to have a github annotation at pull request level which indicates the perf impact of a given PR like