Skip to content

Conversation

zhouselena
Copy link
Contributor

DRIVERS-3254

Move perfcomp from Go Driver to DET.

  • perfcomp CLI, compare calculates the information, mdreport generates markdown comment
  • Added project-to-perf-context map to set up compatibility with all drivers
  • reference: GODRIVER-3102 where the tool was initially created

@zhouselena zhouselena force-pushed the perfcomp branch 4 times, most recently from a6749a7 to 7f71583 Compare August 9, 2025 02:46
@zhouselena zhouselena marked this pull request as ready for review August 11, 2025 13:32
@blink1073
Copy link
Member

So far so good, I ran it against a patch build:

./bin/perfcomp compare --project mongo-python-driver 68967120d8183c0007458ce2
2025/08/11 12:14:54 Successfully connected to MongoDB Analytics node.
2025/08/11 12:14:54 Successfully retrieved 0 docs from version 68967120d8183c0007458ce2.
2025/08/11 12:14:54 🧪 Performance Results
2025/08/11 12:14:54 There were no significant changes to the performance to report for version 68967120d8183c0007458ce2.
| Benchmark | Measurement | % Change | Patch Value | Stable Region | H-Score | Z-Score |
| --------- | ----------- | -------- | ----------- | ------------- | ------- | ------- |

*For a comprehensive view of all microbenchmark results for this PR's commit, please check out the Evergreen perf task for this patch.*

I'll see if I can find a build that does have a change point.

@blink1073
Copy link
Member

I'd also suggest adding a run.sh since it wasn't immediately obvious how to run the command from the bin dir.

@zhouselena
Copy link
Contributor Author

I'd also suggest adding a run.sh since it wasn't immediately obvious how to run the command from the bin dir.

@blink1073 Added .evergreen/run-perf-comp.sh which builds and runs compare, & added instructions to the readme for clarity! Also I fixed up the formatting when there are no significant tests so it shouldn't spit out an empty table. Thanks for testing it out!

@blink1073
Copy link
Member

I purposely caused a slowdown in bson encoding/decoding, and verified that the benchmark went from bout 100 to 7 Mbps for DeepEncoding, but did not get a result.

$ ./bin/perfcomp compare --project mongo-python-driver 689df49066d4460007dc4961
2025/08/14 10:46:13 Successfully connected to MongoDB Analytics node.
2025/08/14 10:46:13 Successfully retrieved 0 docs from version 689df49066d4460007dc4961.
2025/08/14 10:46:14 🧪 Performance Results
2025/08/14 10:46:14 There were no significant changes to the performance to report for version 689df49066d4460007dc4961.
| Benchmark | Measurement | % Change | Patch Value | Stable Region | H-Score | Z-Score |
| --------- | ----------- | -------- | ----------- | ------------- | ------- | ------- |

*For a comprehensive view of all microbenchmark results for this PR's commit, please check out the Evergreen perf task for this patch.*

@zhouselena
Copy link
Contributor Author

@blink1073 did you create a performance context for the python driver? this is needed to filter for all the python project data, it might also take a few hours for the data to be tagged. If not I can also create the context and test it out for python driver!

@blink1073
Copy link
Member

Okay, I'll wait and try later. I targeted this context: https://performance-monitoring-and-analysis.server-tig.prod.corp.mongodb.com/context/name/PyMongo%20Perf.

@zhouselena
Copy link
Contributor Author

zhouselena commented Aug 14, 2025

Okay, I'll wait and try later. I targeted this context: https://performance-monitoring-and-analysis.server-tig.prod.corp.mongodb.com/context/name/PyMongo%20Perf.

ahh I believe thats a time series context, the performance context needs to be a triage context specifically. sorry for not specifying! if you could target a triage context that already exists it should work, if you make a new triage context that may take a few hours. I'll add that to the README for clarity

@blink1073
Copy link
Member

Okay, I created https://performance-monitoring-and-analysis.server-tig.prod.corp.mongodb.com/context/name/PyMongo%20triage%20context. I'll try that one later. 😄

@blink1073
Copy link
Member

Looking good for Python!

$ ./bin/perfcomp compare --perf-context "PyMongo triage context" --project mongo-python-driver --task perf-8.0-standalone --variant performance-benchmarks 689df49066d4460007dc4961
2025/08/18 10:29:41 Successfully connected to MongoDB Analytics node.
2025/08/18 10:29:41 Successfully retrieved 34 docs from version 689df49066d4460007dc4961.
2025/08/18 10:29:44 🧪 Performance Results
2025/08/18 10:29:44 The following benchmark tests for version 689df49066d4460007dc4961 had statistically significant changes (i.e., |z-score| > 1.96):

| Benchmark                      | Measurement       | % Change | Patch Value | Stable Region                                   | H-Score | Z-Score  |
| ---------                      | -----------       | -------- | ----------- | -------------                                   | ------- | -------  |
| DeepDecoding                   | megabytes_per_sec | -93.0001 | 7.1324      | Avg: 101.8930, Med: 101.6913, Stdev: 0.9885     | 0.9952  | -95.8661 |

Copy link
Member

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

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

LGTM, great work!

Copy link
Contributor

@prestonvasquez prestonvasquez left a comment

Choose a reason for hiding this comment

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

Great work 👍

@zhouselena zhouselena merged commit 88a2765 into mongodb-labs:master Aug 18, 2025
77 checks passed
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