From 3745047ccf59bf81a7297c2d7400edb586063f47 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Wed, 21 Jul 2021 18:02:29 -0700 Subject: [PATCH] doc(profile): improve profiling docs --- core/commands/profile.go | 3 +++ docs/debug-guide.md | 3 +++ 2 files changed, 6 insertions(+) diff --git a/core/commands/profile.go b/core/commands/profile.go index 32a1d51bd..46c3ee19b 100644 --- a/core/commands/profile.go +++ b/core/commands/profile.go @@ -38,6 +38,9 @@ Collects cpu, heap, and goroutine profiles from a running go-ipfs daemon into a single zipfile. To aid in debugging, this command also attempts to include a copy of the running go-ipfs binary. +Profile's can be examined using 'go tool pprof', some tips can be found at +https://github.com/ipfs/go-ipfs/blob/master/docs/debug-guide.md. + Privacy Notice: The output file includes: diff --git a/docs/debug-guide.md b/docs/debug-guide.md index 6bcd65308..5090ffecf 100644 --- a/docs/debug-guide.md +++ b/docs/debug-guide.md @@ -79,6 +79,9 @@ that goroutine in the middle of a short wait for something. If the wait time is over a few minutes, that either means that goroutine doesn't do much, or something is pretty wrong. +If you're seeing a lot of goroutines, conside rusing +[stackparse](https://github.com/whyrusleeping/stackparse) to filter, sort, and summarize them. + ### Analyzing the CPU Profile The go team wrote an [excellent article on profiling go