website icon indicating copy to clipboard operation
website copied to clipboard

docs: add pprof analysis examples to Profiling Karmada

Open Mou887 opened this issue 4 months ago • 8 comments

Add quick how-to commands for go tool pprof (top, interactive).

What type of PR is this?

/kind documentation

What this PR does / why we need it: Makes the usage examples for go tool pprof clearer and easier to follow.

Special notes for your reviewer: This is a small documentation change and my first contribution in this repository.

Mou887 avatar Aug 10 '25 19:08 Mou887

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please assign rainbowmango for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

karmada-bot avatar Aug 10 '25 19:08 karmada-bot

Welcome @Mou887! It looks like this is your first PR to karmada-io/website 🎉

karmada-bot avatar Aug 10 '25 19:08 karmada-bot

Hello @XiShanYongYe-Chang , Thank you so much for you feedback ,

I checked Profiling Golang Programs on Kubernetes and Official Go Blog , They include pprof interactive mode commands like top10 and top5 -cum once inside the pprof prompt, but they donot include direct non-interactive CLI commands such as:

go tool pprof -top heap.pprof go tool pprof -top cpu.pprof These let developers get the same results in a single step without entering interactive mode. So I thought it's a good idea to add them.

Regarding the link Official Go Blog The https://blog.golang.org/pprof redirects to https://go.dev/blog/pprof which is not ideal so I will fix it and send the PR again.

Mou887 avatar Aug 11 '25 06:08 Mou887

Regarding the link Official Go Blog The https://blog.golang.org/pprof redirects to https://go.dev/blog/pprof which is not ideal so I will fix it and send the PR again.

1. [Profiling Golang Programs on Kubernetes](https://danlimerick.wordpress.com/2017/01/24/profiling-golang-programs-on-kubernetes/)

I mean this link is no longer working.

XiShanYongYe-Chang avatar Aug 11 '25 06:08 XiShanYongYe-Chang

Hi @XiShanYongYe-Chang , Thanks for the clarification !

I just re-checked the [Profiling Golang Programs on Kubernetes](https://danlimerick.wordpress.com/2017/01/24/profiling-golang-programs-on-kubernetes/ link in both the GitHub-rendered docs and locally in VS Code, and it opens successfully. Could you please share how you accessed it when it appeared broken?

Mou887 avatar Aug 11 '25 07:08 Mou887

I just re-checked the [Profiling Golang Programs on Kubernetes](https://danlimerick.wordpress.com/2017/01/24/profiling-golang-programs-on-kubernetes/ link in both the GitHub-rendered docs and locally in VS Code, and it opens successfully. Could you please share how you accessed it when it appeared broken?

Sorry, ignore my question; it was an issue with my environment. I changed the environment, and it works fine now.

XiShanYongYe-Chang avatar Aug 11 '25 07:08 XiShanYongYe-Chang

Thank you . One question should I change the other link because it is getting redirected or let it be, because it is working ?

Mou887 avatar Aug 11 '25 08:08 Mou887

Thank you . One question should I change the other link because it is getting redirected or let it be, because it is working ?

If it can jump correctly, I think no modification is needed.

XiShanYongYe-Chang avatar Aug 11 '25 11:08 XiShanYongYe-Chang