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: MemStats fields should document their runtime/metrics equivalents #63424

Open
rhysh opened this issue Oct 6, 2023 · 0 comments
Open
Assignees
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. Documentation NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@rhysh
Copy link
Contributor

rhysh commented Oct 6, 2023

What version of Go are you using (go version)?

go1.21.2

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

N/A

What did you do?

Considered updating a library to use the new runtime/metrics API, examined https://pkg.go.dev/runtime#MemStats docs to get the details on how to make the move.

What did you expect to see?

References on each field describing which metric names to use with the runtime/metrics package to get the data without a call to runtime.ReadMemStats (and the resulting app-wide stop-the-world pause). A lot of these metrics are pretty subtle, and it takes very careful reading to make sure that the data from the new source will have the same meaning as the data from the old source.

What did you see instead?

The docs for runtime.MemStats and runtime/metrics do not reference each other's fields.

CC @golang/runtime , and @mknyszek in particular

@prattmic prattmic added compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Oct 6, 2023
@mknyszek mknyszek self-assigned this Oct 11, 2023
@mknyszek mknyszek added this to the Backlog milestone Oct 11, 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 NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
Development

No branches or pull requests

4 participants