<p>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.</p>

Daniel Safta
<p>use <code>import _ &quot;net/http/pprof&quot;</code> in your application file and use <code>go tool pprof</code> commands or web UI to profile your application.</p>
<p>reference -</p>
<ul>
<li><a href="https://golang.org/pkg/net/http/pprof/" rel="nofollow noreferrer">golang.org/pkg/net/http/pprof</a></li>
<li><a href="https://www.freecodecamp.org/news/how-i-investigated-memory-leaks-in-go-using-pprof-on-a-large-codebase-4bec4325e192/" rel="nofollow noreferrer">how-i-investigated-memory-leaks-in-go-using-pprof</a></li>
<li><a href="https://jvns.ca/blog/2017/09/24/profiling-go-with-pprof/" rel="nofollow noreferrer">profiling-go-with-pprof</a></li>
</ul>
