aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2020-12-03 13:49:34 +0000
committerNeil Alexander <neilalexander@users.noreply.github.com>2020-12-03 13:49:34 +0000
commit52905ffb82409fca9665ada0c8da40e05b58b8be (patch)
treedeccd5ef9c08fce8f62f4e31bae02507df336a4f /docs
parent253b05ccde45730a9149626c3af4ee97e8517d9f (diff)
Update PROFILING.md
Diffstat (limited to 'docs')
-rw-r--r--docs/PROFILING.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/PROFILING.md b/docs/PROFILING.md
index 136a757b..b026a8ae 100644
--- a/docs/PROFILING.md
+++ b/docs/PROFILING.md
@@ -31,6 +31,8 @@ http://localhost:65432/debug/pprof/profile?seconds=30
The profile will run for the specified number of `seconds` and then will produce a result.
+### Examine a profile using the Go toolchain
+
If you have Go installed and want to explore the profile, you can invoke `go tool pprof` to start the profile directly. The `-http=` parameter will instruct `go tool pprof` to start a web server providing a view of the captured profile:
```
@@ -39,6 +41,8 @@ go tool pprof -http=localhost:23456 http://localhost:65432/debug/pprof/profile?s
You can then visit `http://localhost:23456` in your web browser to see a visual representation of the profile. Particularly usefully, in the "View" menu, you can select "Flame Graph" to see a proportional interactive graph of CPU usage.
+### Download a profile to send to someone else
+
If you don't have the Go tools installed but just want to capture the profile to send to someone else, you can instead use `curl` to download the profiler results:
```
@@ -57,6 +61,8 @@ http://localhost:65432/debug/pprof/heap
The profile will return almost instantly.
+### Examine a profile using the Go toolchain
+
If you have Go installed and want to explore the profile, you can invoke `go tool pprof` to start the profile directly. The `-http=` parameter will instruct `go tool pprof` to start a web server providing a view of the captured profile:
```
@@ -72,6 +78,8 @@ You can then visit `http://localhost:23456` in your web browser to see a visual
Also in the "View" menu, you can select "Flame Graph" to see a proportional interactive graph of the memory usage.
+### Download a profile to send to someone else
+
If you don't have the Go tools installed but just want to capture the profile to send to someone else, you can instead use `curl` to download the profiler results:
```