Mutex profile

from blog rakyll.org, | ↗ original
Go 1.8 introduces a new profile, the contended mutex profile, that allows you to capture a fraction of the stack traces of goroutines with contended mutexes. You need to set the sampling fraction by calling runtime.SetMutexProfileFraction to a value above zero to enable collection. Consider the following program: import _ "net/http/pprof" var mu...