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

Comments

@MichaelTJones
Copy link
Contributor

@MichaelTJones MichaelTJones commented Jun 2, 2013

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 robpike commented Jun 2, 2013

Comment 1:

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

Status changed to Accepted.

@rsc
Copy link
Contributor

@rsc rsc commented Jul 30, 2013

Comment 2:

Labels changed: added go1.3.

@robpike
Copy link
Contributor

@robpike robpike commented Aug 20, 2013

Comment 4:

Labels changed: removed go1.3.

@rsc
Copy link
Contributor

@rsc rsc commented Nov 27, 2013

Comment 5:

Labels changed: added go1.3maybe.

@rsc
Copy link
Contributor

@rsc rsc commented Dec 4, 2013

Comment 6:

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

@rsc
Copy link
Contributor

@rsc 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 odeke-em commented Jun 6, 2020

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

@odeke-em odeke-em added the help wanted label Jun 6, 2020
@mknyszek
Copy link
Contributor

@mknyszek 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 MichaelTJones commented Jun 8, 2020

@odeke-em
Copy link
Member

@odeke-em 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 Jun 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants