Add an (optional) pprof HTTP listener
We are currently in the dark on where Gitaly spends its CPU cycles. The go standard library contains a profiler which can be exposed on an HTTP service.
I think we should think about how to start using this profiler in production. The simplest (and least scalable) thing would be to:
- add a config option to enable the pprof listener in Gitaly
- configure it to listen on localhost
- when we want to profile, SSH onto a Gitaly server and query the profiler with localhost curl calls
This can be made more 'mature' in various ways.