From fba64a41f5ca1ae056cee4effe4e64d07fe9c2ff Mon Sep 17 00:00:00 2001 From: Marko Mikulicic Date: Fri, 2 Jul 2021 12:47:13 +0200 Subject: [PATCH] docs: improve profiling docs (#1869) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- docs/profiling.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/profiling.md b/docs/profiling.md index db34eb70d2..477d688cc0 100644 --- a/docs/profiling.md +++ b/docs/profiling.md @@ -35,8 +35,18 @@ Showing top 10 nodes out of 185 0 0% 100% 1 1.08% as core::iter::traits::collect::Extend>::extend ``` +# Interactive visualizations + +The `go tool pprof` command can also open an interactive visualization in a web browser page, +that allows you to render a call graph, or a flamegraph or other visualizations, and also search for symbols etc. See: + +```shell +go tool pprof -http=localhost:6060 'http://localhost:8080/debug/pprof/profile?seconds=30' +``` + # Use the built in flame graph renderer +You may not always have the `go` toolchain on your machine. IOx also knows how to render a flamegraph SVG directly if opened directly in the browser: For example, if you aim your browser at an IOx server with a URL such as http://localhost:8080/debug/pprof/profile?seconds=5