安装

安装基本工具

git clone https://github.com/brendangregg/FlameGraph.git
cp flamegraph.pl /usr/local/bin/
flamegraph.pl -h

go get -v -u github.com/uber/go-torch
go-torch -h

brew install graphviz

使用

代码监听 http 服务

_ "net/http/pprof"

压测

# TODO 不同服务不同操作

压测同时获取数据

go-torch -u http://localhost:9191 -t 30