go test -bench . -cpuprofile cpu.out go tool pprof cpu.out 提示用不了,需要安装Graphviz工具. 1.进入官网:http://www.graphviz.org/