简体   繁体   English

Golang-CPU分析图中的秒数是什么意思?

[英]Golang - What is the meaning of the seconds in CPU profiling graph?

For example, the data in the figure runtime.scanobject : 例如,图中runtime.scanobject中的数据:

  1. 13.42s 13.42s
  2. runtime.scanobject 9.69s(4.51%) of 18.30s(8.52%). runtime.scanobject 18.30s(8.52%)的9.69s(4.51%)。
  3. 5.33s 5.33s

what is the meaning of the seconds and percent? 秒和百分比的含义是什么?

Thanks. 谢谢。

在此处输入图片说明

When CPU profiling is enabled, the Go program stops about 100 times per second and records a sample consisting of the program counters on the currently executing goroutine's stack. 启用CPU性能分析后,Go程序每秒停止约100次,并在当前正在执行的goroutine堆栈上记录一个由程序计数器组成的样本。

That time and percentange is in reference to the sample. 时间和百分比是参考样品的时间。

Here is a nice reference for you to read more about it: https://blog.golang.org/profiling-go-programs 这是一个很好的参考,供您阅读有关它的更多信息: https : //blog.golang.org/profiling-go-programs

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM