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

net/http/pprof: missing documentation of the "seconds" parameter #59452

Closed
aktau opened this issue Apr 5, 2023 · 4 comments
Closed

net/http/pprof: missing documentation of the "seconds" parameter #59452

aktau opened this issue Apr 5, 2023 · 4 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. Documentation help wanted NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@aktau
Copy link
Contributor

aktau commented Apr 5, 2023

cc @aalexand

$ go version
Go 1.21-dev

What did you do?

Navigate to https://pkg.go.dev/net/http/pprof and read.

What did you expect to see?

I expected to see a mention of the "seconds" parameter for all profiles types that implement delta profiling:

var profileSupportsDelta = map[handler]bool{
"allocs": true,
"block": true,
"goroutine": true,
"heap": true,
"mutex": true,
"threadcreate": true,
}

What did you see instead?

No mention. This feature was first worked on in #23401 AFAICT. It's been in Go for a while.

@mknyszek mknyszek added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Apr 5, 2023
@mknyszek mknyszek added this to the Backlog milestone Apr 5, 2023
@mknyszek
Copy link
Contributor

mknyszek commented Apr 5, 2023

CC @golang/runtime

The current owners are Cherry and Russ, but should probably just be a compiler/runtime team-owned package, since it has much more to do with runtime/pprof than net/http.

@mknyszek mknyszek added the compiler/runtime Issues related to the Go compiler and/or runtime. label Apr 5, 2023
@mknyszek
Copy link
Contributor

mknyszek commented Apr 5, 2023

Actually, the "seconds" parameter is mentioned in a few places, e.g. https://pkg.go.dev/net/http/pprof#Trace. It's also mentioned in examples. What else should change? Is it just that it's missing on some of them? Profile also mentions it.

Maybe what you're suggesting is better clarity? Like a full list of endpoints (not examples) and their parameters?

@aalexand
Copy link
Contributor

aalexand commented Apr 5, 2023

It would be good to have a way for a reader to know what profiles accept what parameters. For example, the "seconds" parameter was not respected by the mutex handler in the past, and then it was added. It would be good to have this reflected in the docs.

@gopherbot
Copy link

Change https://go.dev/cl/496144 mentions this issue: net/http/pprof: document query params

@dmitshur dmitshur modified the milestones: Backlog, Go1.21 May 20, 2023
@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels May 20, 2023
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 help wanted NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

5 participants