简体   繁体   中英

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

For example, the data in the figure runtime.scanobject :

  1. 13.42s
  2. runtime.scanobject 9.69s(4.51%) of 18.30s(8.52%).
  3. 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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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