Daniel Safta
Daniel Safta

Reputation: 43

Memory-profile runtime golang program

Is there any way to profile a runtime program written in golang? In my case, kubelet shows steady increase in memory and I want to try memory profiling it.

Upvotes: 2

Views: 5478

Answers (1)

nipuna
nipuna

Reputation: 4105

use import _ "net/http/pprof" in your application file and use go tool pprof commands or web UI to profile your application.

reference -

Upvotes: 3

Related Questions