功能:查看生产golang程序执行过程中内存,cpu等状态的火焰图
1.1. 目录结构
google/pprof
1.2. 查看命令
%PProf%
set Server=127.0.0.1:8999
set PWD=%~dp0
%~d0
cd %PWD%
call %PWD%\config.bat
echo %Server%
set Dot=%PWD%\graphviz-2.38\bin
set PATH=%Dot%;%PATH%
set PProf=%PWD%\pprof.exe
set PPROF_TMPDIR=%PWD%\data
::下边是关于CPU获取的方法
%PProf% -http : C:\work\20190603_190507.cpu.data
::%PProf% -http : -alloc_space http://%Server%/debug/pprof/heap
::%PProf% -http : -inuse_space http://%Server%/debug/pprof/heap
::%PProf% -http : http://%Server%/debug/pprof/profile?seconds=30
::下边是关于内存获取的方法
::%PProf% -http : .\data\pprof.samples.cpu.003.pb.gz
::%PProf% -http : http://%Server%/debug/pprof/heap
::%PProf% -http : -alloc_space http://%Server%/debug/pprof/heap
::%PProf% -http : -inuse_space http://%Server%/debug/pprof/heap