【发布时间】:2020-09-30 06:17:27
【问题描述】:
以下命令可以很好地为带有配置文件的网页提供服务,并且我能够对其进行分析,非常好。
去工具 pprof -http=:8082 https://mytestserver.net:443/debug/pprof/profile?seconds=3
但是,如果我尝试跟踪,就会发生这种情况
$ go tool pprof -http=:8082 https://mytestserver.net:443/debug/pprof/trace?seconds=3 通过 HTTP 从 https://mytestserver.net:443/debug/pprof/trace?seconds=3 获取配置文件 https://mytestserver.net:443/debug/pprof/trace?seconds=3:服务器响应:404 Not Found - 未知配置文件 未能获取任何源配置文件
这也不行
$ go tool trace -http=:8082 https://mytestserver.net:443/debug/pprof/trace?seconds=3 2020/09/29 22:34:49 解析跟踪... 无法打开跟踪文件:打开https://mytestserver.net:443/debug/pprof/trace?seconds=3:文件名、目录名或卷标语法不正确。
正在遵循一些示例 https://jvns.ca/blog/2017/09/24/profiling-go-with-pprof/
Trace 可用于可视化 GC 行为以及 Goroutine/Threads 等。
还有其他方法可以生成跟踪吗?
我从 Windows 机器运行跟踪,以下是版本信息 $去版本 去版本go1.15.2 windows/amd64
【问题讨论】: