Closed ChunyiLyu closed 1 week ago
Setting PprofBindAddress in manager options to serve pprof.
PprofBindAddress
pprof
To use:
❯ k -n kratix-platform-system port-forward pod/kratix-platform-controller-manager-5c4df4bc77-wtp6z 8082:8082
❯ curl -s "http://127.0.0.1:8082/debug/pprof/heap" > ./heap.out
❯ go tool pprof -http=:8080 ./heap.out Serving web UI on http://localhost:8080
Then you can get CPU time, heap, flamegraph...etc <img width="1125" alt="Screenshot 2024-06-14 at 16 39 06" src="https://github.com/syntasso/kratix/assets/6786193/813885c0-d4c6-4794-ba71-582989565473">
@ChunyiLyu i rebased this pr with latest main -- hopefully ci will go green 🤞🏽
Context
Setting
PprofBindAddress
in manager options to servepprof
.To use:
❯ curl -s "http://127.0.0.1:8082/debug/pprof/heap" > ./heap.out
❯ go tool pprof -http=:8080 ./heap.out Serving web UI on http://localhost:8080