1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-06 00:35:23 +02:00
tldr/pages/common/pprof.md
Managor d1fa35edf6
common/*: reduce usage of "command-line" (part 2) (#16950)
Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>
2025-06-29 11:47:23 +03:00

710 B

pprof

Visualize and analyze profiling data. More information: https://github.com/google/pprof.

  • Generate a text report from a specific profiling file, on fibbo binary:

pprof -top {{./fibbo}} {{./fibbo-profile.pb.gz}}

  • Generate a graph and open it on a web browser:

pprof -svg {{./fibbo}} {{./fibbo-profile.pb.gz}}

  • Run pprof in interactive mode to be able to manually launch pprof on a file:

pprof {{./fibbo}} {{./fibbo-profile.pb.gz}}

  • Run a web server that serves a web interface on top of pprof:

pprof -http={{localhost:8080}} {{./fibbo}} {{./fibbo-profile.pb.gz}}

  • Fetch a profile from an HTTP server and generate a report:

pprof {{http://localhost:8080/debug/pprof}}