Skip to content

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

Merged
merged 7 commits into from
Aug 25, 2023

Conversation

alcaeus
Copy link
Member

@alcaeus alcaeus commented Aug 4, 2023

PHPLIB-1183

This PR adds initial performance tests. For the time being, this tests the performance of MongoDB\BSON\Document and MongoDB\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.

@@ -0,0 +1,43 @@
<?php

namespace MongoDB\Benchmark;
Copy link
Member

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.

Copy link
Member Author

@alcaeus alcaeus Aug 16, 2023

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.

@alcaeus alcaeus requested a review from GromNaN August 16, 2023 11:28
@alcaeus alcaeus force-pushed the phplib-1183-initial-performance-tests branch from 18032c8 to 951e6ba Compare August 25, 2023 07:52
@alcaeus alcaeus removed the request for review from GromNaN August 25, 2023 07:56
Copy link
Member

@GromNaN GromNaN left a 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?

@alcaeus
Copy link
Member Author

alcaeus commented Aug 25, 2023

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.

@alcaeus alcaeus merged commit 57a7f3b into mongodb:master Aug 25, 2023
@alcaeus alcaeus deleted the phplib-1183-initial-performance-tests branch August 25, 2023 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants