-
Notifications
You must be signed in to change notification settings - Fork 916
Add a convenience wrapper for profiling and tracing Go tests. #2213
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
Add a convenience wrapper for profiling and tracing Go tests. #2213
Conversation
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.
Pull Request Overview
Adds a convenience script to simplify profiling and tracing Go tests and benchmarks by providing an interactive menu to select profile types and automatically generating temporary files for the output.
- Introduces
etc/profile-test.sh
script that wrapsgo test
with profiling capabilities - Provides interactive selection between cpu, memory, block, mutex profiling and tracing
- Automatically creates temporary files and launches appropriate visualization tools
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
🧪 Performance ResultsCommit SHA: 80c3f56The following benchmark tests for version 68dbf491ef4ed80007e12bd1 had statistically significant changes (i.e., |z-score| > 1.96):
For a comprehensive view of all microbenchmark results for this PR's commit, please check out the Evergreen perf task for this patch. |
API Change ReportNo changes found! |
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 think it is a good approach. We can polish the script along the way. However, what are your thoughts on combining this one with "run-goleak-test.sh", or putting both in a tests sub-folder?
@qingyang-hu The "run-goleak-test.sh" script doesn't support running any test like "profile-test.sh" does; it only runs the tests in the "internal/test/goleak" submodule. I'm not sure combining them would make sense. I do think we should move most of the scripts in the "etc/" directory into the ".evergreen/" directory, but we should do that in another PR. |
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.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Summary
Add a script
etc/profile-test.sh
that makes profiling and tracing Go tests and benchmarks easier.Background & Motivation
The command syntax is identical to
go test
, but you replacego test
withetc/profile-test.sh
.E.g.