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

runtime/pprof: document custom profiles #18453

Open
josharian opened this issue Dec 28, 2016 · 2 comments
Open

runtime/pprof: document custom profiles #18453

josharian opened this issue Dec 28, 2016 · 2 comments

Comments

@josharian
Copy link
Contributor

@josharian josharian commented Dec 28, 2016

Custom profiles are under-documented.

The most important missing piece of documentation is the mental model for the API. Based on reading the code, the intended use is something like:

When an event that you are interested in starts, call Add with some unique identifier for the event. When an event stops, call Remove with the unique identifier. Calling WriteTo dumps all currently active events.

An example and perhaps a blog post showing a real life solved use case would be very helpful.

I also think that there are useful profiling-y use cases not well served by the current API/implementation. I will file a separate issue about that.

cc @matloob

@pwaller

This comment has been minimized.

Copy link
Contributor

@pwaller pwaller commented Jan 2, 2017

(Marginally) related: #14689

@AlekSi

This comment has been minimized.

Copy link
Contributor

@AlekSi AlekSi commented Feb 17, 2017

In the meantime, this blog post can be used as documentation: https://medium.com/@cep21/creating-custom-go-profiles-with-pprof-b737dfc58e11

@bradfitz bradfitz modified the milestones: Go1.10, Go1.9 Jul 6, 2017
@rsc rsc modified the milestones: Go1.10, Go1.11 Nov 29, 2017
@gopherbot gopherbot modified the milestones: Go1.11, Unplanned May 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.