You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reading more about profiling for realtime applications in golang, it turned out that the previous way we enabled cpu and memory profiling is not the best for our use case.
I am adding a new pr that reverts part of what I have done this morning and enables realtime profiling via http server, which is the preferred way to go when debugging remote applications.
Breakdown
using net/http/pprof package that serves the full profiling api via http
enabling profiling api only when running app with -cpu-profile flag (see updated readme)
refactoring the way monitoring server is instantiated: not using default http hanlder anymore
Expected behavior
when running node with -cpu-profile flag a set of new endpoints will be exposed on port 'cpuProfilingPort' (from config.toml)
for details see https://golang.org/pkg/net/http/pprof/