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
Labels
Documentation NeedsFix
Milestone

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

@josharian josharian added Documentation NeedsFix labels Dec 28, 2016
@josharian josharian added this to the Go1.9 milestone Dec 28, 2016
@pwaller
Copy link
Contributor

@pwaller pwaller commented Jan 2, 2017

(Marginally) related: #14689

@AlekSi
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 added this to the Go1.10 milestone Jul 6, 2017
@bradfitz bradfitz removed this from the Go1.9 milestone Jul 6, 2017
@rsc rsc removed this from the Go1.10 milestone Nov 29, 2017
@rsc rsc added this to the Go1.11 milestone Nov 29, 2017
@gopherbot gopherbot removed this from the Go1.11 milestone May 23, 2018
@gopherbot gopherbot added this to the Unplanned milestone May 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation NeedsFix
Projects
None yet
Development

No branches or pull requests

6 participants