-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 new documentation explaining the usage of Pprof #4160
Conversation
Hi @TAM360. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
6338a0a
to
9b7d813
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.
Great work 🥇 Well done 🚀
I added some comments /suggestions in my review !!!
PS.: See that in this case we do not use in the title go/v4
because the change is not in the source code of the plugin. It is only for docs. The title is what we use to generate the release notes, in case of doc changes it will not end up in the summary, just in all changes done in the release, see for example: https://github.com/kubernetes-sigs/kubebuilder/releases/tag/v4.2.0
9d134c1
to
c4eed09
Compare
1bc9803
to
7a2e873
Compare
/ok-to-test |
Hi @zqzten You asked for this one and is the author of the implementation in C+R. |
/approved |
7a2e873
to
ce43133
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.
Thanks for the work!
I have some opinions on the Pprof Not Recommended for Production
section, as pprof would only introduce overhead on actual CPU sampling (by calling the API) and can be useful for debugging performance issues in production (sometimes performance issue cannot be easily reproduced in test env or after restarting process to enable pprof in production), so the tip might be Use Pprof in Production with Caution
to instruct that:
- Pprof endpoint should be protected in production for security reasons.
- Pprof would introduce overhead on CPU sampling (when calling the API).
@camilamacedo86 WDYT? |
Hi @zqzten, Regarding: PR Review 4160
I believe we should be clear in our messaging here. If we say "not recommended" (as we use it in other places like for metrics) and provide clear reasoning, users will understand that this feature should not be enabled by default. However, if we use language like "use with caution," it could lead to confusion and encourage users to deliver solutions with it enabled by default, which could lead to unintended consequences. It’s analogous to troubleshooting in an environment. If a scenario cannot be reproduced in one environment, you naturally move to an environment where it can be reproduced, ensuring that you’re working under the right conditions. In other words, not matter we say that is NOT recommended for Prod, if the person need to test things out in Prod for any reason this person will do that.
I think we can rewording it to clarify that is mainly CPU . I will add a suggestion and ping you. Is that make sense ? |
ce43133
to
61a83b7
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
Thanks!
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.
All conveyed suggestions with the author of the issue are addressed
So, it seems that all is done and we can get this one merged !!!
/lgtm
/approved
/ok-to-test
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: camilamacedo86, TAM360, zqzten The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Description
This PR introduces a new documentation file explaining the purpose, and usage of
pprof
library within the Kubebuilder project.Motivation
Pprof is a profiling library designed for retrieving and visualization profiling statistics such as CPU, and Memory usage of Go application. With Pprof, you can identify, and fix the bottlenecks that are hampering the performance of your Controller.
Pprof comes as part of controller-runtime package since
v0.15.x
which is used by Kubebuilder under the hood.Having an introductory tutorial will help any existing or future user of Kubebuilder in about analyzing their own codebase's behavior, without relying on any external resources.
Issues fixed
3338