- xml - AJAX/Jquery XML 解析
- 具有多重继承的 XML 模式
- .net - 枚举序列化 Json 与 XML
- XML 简单类型、简单内容、复杂类型、复杂内容
我一直在尝试使用 pprof 分析我的 go 应用程序 (evm-specification-miner
),但输出并不是很有用:
(pprof) top5
108.59mins of 109.29mins total (99.36%)
Dropped 607 nodes (cum <= 0.55mins)
Showing top 5 nodes out of 103 (cum >= 0.98mins)
flat flat% sum% cum cum%
107.83mins 98.66% 98.66% 108.64mins 99.40% [evm-specification-miner]
0.36mins 0.33% 98.99% 6mins 5.49% net.dialIP
0.30mins 0.28% 99.27% 4.18mins 3.83% net.listenIP
0.06mins 0.052% 99.32% 34.66mins 31.71%
github.com/urfave/cli.BoolFlag.ApplyWithError
0.04mins 0.036% 99.36% 0.98mins 0.9% net.probeIPv6Stack
这是累积输出:
(pprof) top5 --cum
1.80hrs of 1.82hrs total (98.66%)
Dropped 607 nodes (cum <= 0.01hrs)
Showing top 5 nodes out of 103 (cum >= 1.53hrs)
flat flat% sum% cum cum%
1.80hrs 98.66% 98.66% 1.81hrs 99.40% [evm-specification-miner]
0 0% 98.66% 1.53hrs 83.93% net.IP.matchAddrFamily
0 0% 98.66% 1.53hrs 83.92% net.(*UDPConn).WriteToUDP
0 0% 98.66% 1.53hrs 83.90% net.sockaddrToUDP
0 0% 98.66% 1.53hrs 83.89% net.(*UDPConn).readMsg
如您所见,大部分时间都花在 evm-specification-miner
(这是我的 go 应用程序的名称)中,但我一直无法获得更多细节甚至理解这些方括号的意思(有a question有类似的问题,但没有得到任何答复)。
以下是构建和 pprof 命令:
go install evm-specification-miner
go tool pprof evm-specification-miner cpuprof
我什至尝试了调试标志 -gcflags "-N -l"
(如此处所述:https://golang.org/doc/gdb#Introduction),但无济于事。
分析是通过调用 pprof.StartCPUProfile()
和 pprof.StopCPUProfile()
完成的,如这篇博文所述:https://blog.golang.org/profiling-go-programs :
func StartProfiling(cpuprof string) error {
f, err := os.Create(cpuprof)
if err != nil {
return err
}
return pprof.StartCPUProfile(f)
}
func StopProfiling() error {
pprof.StopCPUProfile()
return nil
}
StartProfiling
在 main()
开始时调用,StopProfiling
在收到信号(中断或终止)时调用(或者如果程序正常终止)。此配置文件是在中断后获得的。
最佳答案
看起来更新到 1.9rc1 修复了它。
我的配置文件中不再有[evm-specifiation-miner]
(郑重声明,最重要的功能甚至都不是来 self 自己的包,所以这比它们没有更奇怪之前出现)。
关于go - pprof(对于 golang)不显示我的包的详细信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45309074/
我一直在阅读这里的概要分析,它是使用 net_http_pprof 解释的在这里 runtime_pprof .那么,这两者之间有什么区别,应该更喜欢哪一个。并且请不要粘贴给定链接中的概述定义 最佳答
我试图弄清楚 pprof 如何计算我的 Go 应用程序输出中每个节点的 %cum。我附上了我的 pprof png 输出的一部分以强调我试图找出的问题 pprof png output在这部分 ppr
如何使用 pprof 来定位现网 Golang 问题,已经是一名 Gopher 所需要掌握的必备技能了。我们在实际工作中也经常使用它来定位现网问题。网上有很多文章来描述 pprof 的使用,但是实际的
我对 pprof 还算陌生。我已经开始进行 CPU 分析,并在一段时间后检查了 top25。这就是我得到的: Showing top 25 nodes out of 174 flat f
我的应用程序在 CentOS 上运行,当我运行 curl localhost:port/debug/pprof/profile > some.pprof,并运行 go tool pprof some.
我正在尝试让 pprof 使用 Golang。 --text 似乎可以正常工作,但大多数其他选项都不起作用。 以 pdf 为例: root@ubuntu:/home/user/IdeaProjects
我有一个 go 二进制文件,它使用 cobra 作为子命令。每个子命令都有它自己的标志。我希望能够为具有一组特定参数的命令创建 CPU 配置文件,例如: myBinary dryRun -c conf
在检查 pprof 的输出时,我可以看到 goroutine 的堆栈跟踪。但是我想知道是谁开始(产生?)这个 goroutine,这可能吗? 最佳答案 如果您查看端点 /debug/pprof/gor
遵循本指南 http://golang.org/pkg/net/http/pprof/ ,我正在尝试查看堆报告。当我导航到适当的 url 时,将显示以下内容: 我尝试使用 ActivePerl、Str
当我使用 Linux 的 time 实用程序测量我的 Go 程序的运行时间时,我得到以下输出: real 1m9.177s user 7m1.788s sys 0m39.016s
我正在尝试找到一种方法来存储来自 pprof 的堆数据,以便我可以共享它、稍后查看它、附加到问题等等。到目前为止,我的尝试没有奏效。 如果我跑 go tool pprof http://my-serv
当我使用 pprof 分析堆时,我得到以下信息: 但是,我不清楚如何解释该可视化。特别是: “箭头旁边的内存表示 _____,盒子内部的内存表示 ______。所以当一个盒子有多个箭头时,它表示 __
我正在尝试分析一个用 go 编写的应用程序,它显然使用了大约 256 个虚拟内存(使用 ps aux 检查)。我正在尝试使用 pprof打包并查看哪些函数分配/消耗了大部分内存,但结果对我来说毫无意义
如何获得命中数: (pprof) top Total: 2525 samples 298 11.8% 11.8% 345 13.7% runtime.mapaccess1_f
我想profile我的由 go test -c 生成的基准测试,但是 go tool pprof 需要一个 profile 文件,通常在主要功能如 this : func main() { f
关闭。这个问题是not reproducible or was caused by typos .它目前不接受答案。 想改进这个问题?将问题更新为 on-topic对于堆栈溢出。 1年前关闭。 Imp
我对 pprof 有点陌生工具,我想知道在生产中继续运行它是否可以。从我看过的文章来看,它似乎还可以且标准,但是我很困惑这不会影响性能,因为它进行了采样 N每秒一次,为什么这不会导致性能下降。 最佳答
这个问题在这里已经有了答案: golang tool pprof not working properly - same broken output regardless of profiling
我正在尝试分析我编写的 Web 服务器,但我的 pprof 不包含有关处理程序函数的任何数据。 我正在使用 httprouter package由 julienschmidt 编写,并想简单地对我的一
我一直在尝试使用 pprof 分析我的 go 应用程序 (evm-specification-miner),但输出并不是很有用: (pprof) top5 108.59mins of 109.29mi
我是一名优秀的程序员,十分优秀!