参数
-R
:是否递归,即如果列出的目录中仍有子目录或者文件,将所有目录下面的文件都显示出来。-l
:显示文件的形态、权限、拥有者、文件大小、最后修改时间、文件的完整名称(文件名+扩展名)。显示格式是每一行显示一个文件或者目录。-a
: List all files, including hidden files-r
: list subdirectories recursively
pprof is a tool for visualization and analysis of profiling data.
pprof reads a collection of profiling samples in profile.proto format and generates reports to visualize and help analyze the data. It can generate both text and graphical reports (through the use of the dot visualization package).
profile.proto is a protocol buffer that describes a set of callstacks and symbolization information. A common usage is to represent a set of sampled callstacks from statistical profiling. The format is described on the proto/profile.proto file. For details on protocol buffers, see https://developers.google.com/protocol-buffers
Profiles can be read from a local file, or over http. Multiple profiles of the same type can be aggregated or compared.
If the profile samples contain machine addresses, pprof can symbolize them through the use of the native binutils tools (addr2line and nm).
想要进行性能优化,首先瞩目在 Go 自身提供的工具链来作为分析依据,本文将带你学习、使用 Go 后花园,涉及如下: