-
Notifications
You must be signed in to change notification settings - Fork 266
PHPLIB-1183: Initial performance tests #1141
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
PHPLIB-1183: Initial performance tests #1141
Conversation
@@ -0,0 +1,43 @@ | |||
<?php | |||
|
|||
namespace MongoDB\Benchmark; |
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.
Is this file missing a copyright block?
Do we actually need those for benchmarks? We don't use it in our test files.
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.
We don't use them for tests, so I omitted them here as well.
Edit: I noted other benchmark files included them. I removed them everywhere, as strictly speaking the copyright is already noted in the repository anyways.
18032c8
to
951e6ba
Compare
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.
LGTM.
I see the report is in the CI artifacts.
But there is no automatic comparison with previous build ATM?
Not yet - there are a number of variables to control before making that viable, most notably ensuring that unrelated changes (e.g. newer server versions, operating systems, etc.) don't affect results. We'll also have to define metrics and add assertions to then make the build fail. |
PHPLIB-1183
This PR adds initial performance tests. For the time being, this tests the performance of
MongoDB\BSON\Document
andMongoDB\BSON\PackedArray
, and runs comparative benchmarks as defined in the BSON benchmark spec.The performance tests for the BSON classes could theoretically be moved to the PHPC repo, but would require setting up an entirely new composer project. For the time being the tests can live here, but they should be moved to PHPC when we start regression testing so that any performance regressions can be caught directly while doing the work.