8 3 使用pprof进行性能调优
go test -bench . -cpuprofile cpu.out go tool pprof cpu.out 测试更多方面的信息 go test -bench . -cpuprofile cpu.out 查看CPU结果 go tool pprof cpu.out //此时进入交互式命令,可以输入help查看帮助 web //自动弹出网页展示svg图查看结果 注意,如果报错:Failed to execute dot. Is Graphviz installed? Error: exec: dot: executable file not found in %PATH%
下载地址
用户评论