golang pprof 监控系列(4) —— goroutine thread 统计原理
首先地址栏 /debug/pprof/goroutine?debug= 1 代表这是在访问goroutine指标信息,debug =1 代表访问的内容将会以文本可读的形式展现出来。 debug=0 则是会下载一个goroutine指标信息的二进制文件,这个文件可以通过go tool pprof 工具去进行分析,关于go tool pprof 的使用网上也有相当多的资料,这里就不展开了。 debug = 2 将会把当前所有协程的堆栈信息以文本可读形式展示在网页上。如下图所示: