This is a creation in Article, where the information may have evolved or changed.
Google/pprof is a performance visualization and analysis tool developed by Google engineers. While claiming to be not Google's official tool, the project hangs under Google's team and is also used in other Google projects, which is a great profiling tool.
Go tool pprof copies a copy google/pprof of the code, encapsulating a Golang tool that analyzes the profiling data that the go Pprof package produces, that is, the processing and analysis of the final data, or the gogole/pprof implementation.
In this way, you can at least analyze the data of the Go program in two ways pprof :
go tool pprof: Tools for Go Package pprof
pprof: The original pprof tool
pprofRead and write a set profile.proto of data, produce visual data analysis report, data is protocol buffer format data, the specific format can refer to: Profile.proto. As a result, it can analyze programs that can produce this format arbitrarily, regardless of the language in which the program was developed.
It can read the local profiling data, or through the HTTP access line of real-time profiling data, the specific use of the method can refer to the official instructions.
Today, in August, pprof a new UI was released. The new UI provides a top menu (toolbar) that can provide a variety of different functions for switching, very convenient. At the same time, the display also provides a new style, more good-looking, SVG diagram of the display is more eye-catching.
Now another very important feature flame diagram is also incorporated into the main branch, so that we do not have to use third-party tool Go-torch and so on to view the flame diagram. This also means that in the Go 1.10 released next February we can directly go tool pprof view the flame map.
If you do not want to wait until next February, you can download the latest pprof to view.
go get -u github.com/google/pprof