Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug-guide.md added memory statistics command #5546

Merged
merged 1 commit into from
Oct 2, 2018
Merged

debug-guide.md added memory statistics command #5546

merged 1 commit into from
Oct 2, 2018

Conversation

rob-deutsch
Copy link
Contributor

This would've been valuable to me while investigating #5530.

I discovered that more debug commands are also available, but I don't know enough about them to add them myself (e.g. debug/pprof-mutex, debug/metrics/prometheus).

@schomatis
Copy link
Contributor

Thanks @rob-deutsch! Could you add a link to the memstats object you're referring to, and also if possible, what interesting information a user might find in it? (e.g., how did it help your particular debug scenario)

@rob-deutsch
Copy link
Contributor Author

Thanks @schomatis, resubmitted with suggested additions.

schomatis
schomatis previously approved these changes Oct 1, 2018
Copy link
Contributor

@schomatis schomatis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@@ -84,6 +86,10 @@ about `go tool pprof`. My go-to method of analyzing these is to run the `web`
command, which generates an SVG dotgraph and opens it in your browser. This is
the quickest way to easily point out where the hot spots in the code are.

### Analysing vars and memory statistics
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: could you also add an entry in the "Table of Contents" above pointing here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drat, my bad, will do

@rob-deutsch
Copy link
Contributor Author

... I also noticed (and fixed) the inconsistent spelling of analyse/analyze, just to make it a tad neater.

@schomatis
Copy link
Contributor

... I also noticed (and fixed) the inconsistent spelling of analyse/analyze, just to make it a tad neater.

I think they are both right but "analyze" is the accepted American spelling.

License: MIT
Signed-off-by: Rob Deutsch <rdeutschob@gmail.com>
@rob-deutsch
Copy link
Contributor Author

In the case of ambiguity I tend to prefer British English, but some after some Googling I learned that US English is generally accepted for this kind of purpose.

Resubmitted with US English and a small frown of disapproval 😉

Copy link
Contributor

@schomatis schomatis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing the "stack dump" entry also! Beyond the call of duty 🎖️

@Kubuxu
Copy link
Member

Kubuxu commented Oct 2, 2018

There is also a much simpler option for non-linux folks to download most of the info: going to localhost:5001/debug/pprof/ and doing Save as on the links.

Not blocking this PR in any regard, just mentioning it as I discovered it recently.


EDIT: localhost:5001/debug/ -> localhost:5001/debug/pprof/

@rob-deutsch
Copy link
Contributor Author

I'm getting a 404 error on localhost:5001/debug/. That sounds like a handy feature though, can we integrate that to master?

@Kubuxu
Copy link
Member

Kubuxu commented Oct 2, 2018

Sorry: localhost:5001/debug/pprof/.

Unfortunately no vars there.

@Stebalien Stebalien merged commit 9569f99 into ipfs:master Oct 2, 2018
@rob-deutsch rob-deutsch deleted the doc/debug branch October 3, 2018 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/docs-ipfs Topic docs-ipfs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants