【问题标题】:Error while trying to invoke Golang trace尝试调用 Golang 跟踪时出错
【发布时间】: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

【问题讨论】:

    标签: go trace


    【解决方案1】:

    您是否尝试过使用 http 而不是安全连接? 它似乎只适用于 http 连接 FYR.. https://golang.org/pkg/net/http/pprof/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-10-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-28
      • 1970-01-01
      相关资源
      最近更新 更多