Runtime Statistics and Profiling
The Go language provides CPU and memory profiling capabilities. With the profiling tools provided by Go, one can identify and correct the specific bottlenecks. You can make your app run faster and with less memory.
The pprof
package writes runtime profiling data in the format expected by the pprof
visualization tool. There are many commands available from the pprof
command line. Commonly used commands include top
.
For details about profiling, see the “Go Language Runtime Statistics and Profiling” section