boulder
boulder copied to clipboard
Allow setting block profile rate and mutex profile rate
We export some useful pprof endpoints, including /debug/mutex and /debug/block, to profile mutexes and blocking respectively: https://pkg.go.dev/net/http/pprof
However, to actually get data out of these we need to call runtime.SetMutexProfileFraction and/or runtime.SetBlockProfileRate. We should add a facility to set those. The most straightforward way would be to make these config fields for all our binaries; but it would probably be better to be able to turn these on or off live by making an HTTP request.