diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0a90054d9..bc225d218 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -284,14 +284,16 @@ Small, ad-hoc changes/PRs to Helm which introduce user facing changes, which wou ### Profiling PRs -If your contribution requires profiling to check memory and/or CPU usage, you can set `HELM_PPROF=cpu=/path/to/cpu.prof,mem=/path/to/mem.prof` environment variable to collect runtime profiling data for analysis. You can use Golang's [pprof](https://github.com/google/pprof/blob/main/doc/README.md) tool to inspect the results. +If your contribution requires profiling to check memory and/or CPU usage, you can set `HELM_PPROF_CPU_PROFILE=/path/to/cpu.prof HELM_PPROF_MEM_PROFILE=/path/to/mem.prof helm show all bitnami/nginx` environment variable to collect runtime profiling data for analysis. You can use Golang's [pprof](https://github.com/google/pprof/blob/main/doc/README.md) tool to inspect the results. Example analysing collected profiling data ``` -HELM_PPROF=cpu=/path/to/cpu.prof,mem=/path/to/mem.prof helm show all bitnami/nginx +HELM_PPROF_CPU_PROFILE=cpu.prof HELM_PPROF_MEM_PROFILE=mem.prof helm show all bitnami/nginx # Visualize graphs. You need to have installed graphviz package in your system go tool pprof -http=":8000" cpu.prof + +go tool pprof -http=":8001" mem.prof ``` ## The Triager