Uploads pprof files to Stackdriver Profiler.
- Enable Stackdriver Profiler API.
- If running outside of Google Compute Engine, install gcloud and run
gcloud auth application-default login
.
Linux 64-bit:
$ curl http://storage.googleapis.com/jbd-releases/pprof-upload-linuxamd64 > pprof-upload && chmod +x pprof-upload
macOS 64-bit:
$ curl http://storage.googleapis.com/jbd-releases/pprof-upload-darwinamd64 > pprof-upload && chmod +x pprof-upload
Windows 64-bit:
- Download http://storage.googleapis.com/jbd-releases/pprof-upload-windowsamd64
- Put the download folder to your PATH.
Capture pprof profiles, for example by using the
net/http/pprof package. See examples/helloworld
for an example.
$ curl http://localhost:6060/debug/pprof/profile?seconds=30 > pprof.out
$ pprof-upload -target=webserver
https://console.cloud.google.com/profiler/webserver;type=CPU?project=PROJECT
- pprof-upload should recognize profile type from the input file.