You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
runtime.NumGoroutine() reports the number of live goroutines. Can there be something
that exports the total count?
Eg, we had a process that was regularly creating/destroying more than 10,000 goroutines
a second, but the working set size is always about 3,000. The creation rate was both
unexpected and a performance problem. There's not currently a convenient way to extract
this information.
The text was updated successfully, but these errors were encountered:
How did you find it? I assume with a CPU profiler. If so I do not see a reason to add
separate goroutine counter. First, if the goroutine creation does not show up in the CPU
profile, then it is not a problem; otherwise it's discoverable with CPU profiler.
Second, we can't add counters for all operations in runtime; CPU and memory profilers
are generic tools that uncover all issues of such kind.
odeke-em
changed the title
runtime: add total lifetime # of goroutines created
proposal: runtime: add total lifetime # of goroutines created
Dec 23, 2017
I agree with @dvyukov's comment. Ordinary CPU profiling should show this, and is what people are going to reach for before printing a little-known runtime counter.
by dtmoore@google.com:
The text was updated successfully, but these errors were encountered: