Enable workhorse Go profiler server by default
See https://golang.org/pkg/net/http/pprof/#pkg-overview
On top of StackDriver continuous profiling, which is baked into LabKit, Workhorse has support for starting a pprof
server that one can connect to over TCP. It exposes several endpoints to pull CPU, heap etc profiles. The overhead is minimal since it's lazy; you only pay the cost for importing this handler by default. CPU profiles would still have to be triggered by visiting a specific URL (see docs)
I think this should be enabled by default.
Note that I decided to merely expose
the profiler port, not bind it to the host machine. This is to not accidentally clash with something that's already running on 6060
. You will therefore have to add an override that also binds 6060 to the host machine.