Linux command
pproftui 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Analyze a CPU profile
pproftui [cpu.prof]
Focus on your module's code
pproftui --module-path=[github.com/your/project] [cpu.prof]
Live-fetch CPU profiles from a running server
pproftui -live=[http://localhost:6060/debug/pprof/profile?seconds=5] -refresh=[10s]
说明
pproftui is a terminal-based UI for Go's pprof that makes profiling interactive and intuitive. It provides integrated source code and call graph views with an option to hide Go runtime functions. Its diffing feature highlights resource usage changes between profiles using color-coded indicators.
参数
- --module-path _PATH_
- Focus on code from the specified Go module path.
- -live _URL_
- Fetch profiles from a running HTTP pprof endpoint.
- -refresh _DURATION_
- Refresh interval for live profiling.
FAQ
What is the pproftui command used for?
pproftui is a terminal-based UI for Go's pprof that makes profiling interactive and intuitive. It provides integrated source code and call graph views with an option to hide Go runtime functions. Its diffing feature highlights resource usage changes between profiles using color-coded indicators.
How do I run a basic pproftui example?
Run `pproftui [cpu.prof]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --module-path _PATH_ do in pproftui?
Focus on code from the specified Go module path.