Tag Archives: pprof

How to work with core dumps of Go programs

If you want to check what is going on in your service during load (on production or during stress testing process), you can take a core dump of your app and load it into Goland for further debugging. # first you need to get your app’s PID ps aux|grep gcore # download dump file and …

Read more

How to analyze the performance of your go application in production

You should definitely use chi’s middleware for running pprof and stuff in your admin panel. That’s the repo — https://github.com/go-chi/chi That’s the profiler — https://github.com/go-chi/chi/blob/master/middleware/profiler.go CPU profiling After that you can run something like this in shell: go tool pprof -png ~/Downloads/profile Or just open it in the browser: go tool pprof -http=:1234 ~/Downloads/profile If …

Read more