以下命令可以很好地为带有配置文件的网页提供服务,我能够对其进行分析,很好。
转到工具pprof -http =:8082 https://mytestserver.net:443/debug/pprof/profile?seconds=3
但是,如果我尝试跟踪,就会发生这种情况
$ go工具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未找到-未知配置文件 无法获取任何源配置文件
这也不起作用
$ go工具跟踪-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/
跟踪对于可视化GC行为以及Goroutine /线程等很有用。
还有另一种生成跟踪的方法吗?
我从Windows计算机上运行跟踪,以下是版本信息 $ go版本 go版本go1.15.2 Windows / amd64