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
compiler/runtime Issues related to the Go compiler and/or runtime. Documentation NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@josharian
Copy link
Contributor

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 The path to resolution is known, but the work has not been done. labels Dec 28, 2016
@josharian josharian added this to the Go1.9 milestone Dec 28, 2016
@pwaller
Copy link
Contributor

pwaller commented Jan 2, 2017

(Marginally) related: #14689

@AlekSi
Copy link
Contributor

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
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. Documentation NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

6 participants