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/debug: provide channel statistics #5611

Closed
MichaelTJones opened this issue Jun 2, 2013 · 10 comments
Closed

runtime/debug: provide channel statistics #5611

MichaelTJones opened this issue Jun 2, 2013 · 10 comments

Comments

@MichaelTJones
Copy link
Contributor

I just now happened to want to know how many channel sends a certain Go program made. 

This class of statistic would interesting for a Go runtime environment variable, akin to
GC tracing, to gather and report on program exit. "N send, N receive, ..."
Maybe K blocked or Z goroutines spawned, Z' still alive.
@robpike
Copy link
Contributor

robpike commented Jun 2, 2013

Comment 1:

Labels changed: added priority-later, removed priority-triage.

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Jul 30, 2013

Comment 2:

Labels changed: added go1.3.

@robpike
Copy link
Contributor

robpike commented Aug 20, 2013

Comment 4:

Labels changed: removed go1.3.

@rsc
Copy link
Contributor

rsc commented Nov 27, 2013

Comment 5:

Labels changed: added go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 6:

Labels changed: added release-none, removed go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 7:

Labels changed: added repo-main.

@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@odeke-em
Copy link
Member

odeke-em commented Jun 6, 2020

Thank you for the feature request @MichaelTJones! @mknyszek, perhaps this issue might interest you?

@mknyszek
Copy link
Contributor

mknyszek commented Jun 8, 2020

I don't think we're going to add something like this to existing packages, however there is #37112 for which a statistic like this would be appropriate.

I think in practice for this to not be terribly slow we would need to do something similar to what we do for allocations: accumulate the statistics per-P and flush them during a stats-reading STW operation.

@MichaelTJones
Copy link
Contributor Author

MichaelTJones commented Jun 8, 2020 via email

@odeke-em
Copy link
Member

odeke-em commented Jun 8, 2020

Thank you for the responses @mknyszek and @MichaelTJones!

This zombie proposal has staggered along for seven years and can now die and find peace.

Bits to bits, atoms to atoms, I shall thus close this issue. Thank you.

@odeke-em odeke-em closed this as completed Jun 8, 2020
@golang golang locked and limited conversation to collaborators Jun 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants