proposal: Allow profiling channels usage/utilization via pprof #27347
Labels
FrozenDueToAge
Proposal
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
Milestone
(this is a continuation of a thread that started on go-nuts)
Goal
I am proposing to extend pprof.Profile with information about active channels.
This is inspired by pprof.SetGoroutineLabels and other information already available in pprof about go routines (list of go routines, stack trace for each go routine). Making this data available via pprof would simplify the development of publisher/subscriber applications. Providing information about the the count, memory use, and utilization (fill rate) of all existing channels could speed up development. Especially IO-heavy operations that use channels for async IO would benefit from embedding this kind of information into pprof.
Examples for additional data
For each channel c of type chan T, being able to gather the following data via pprof may be useful:
(Immutable)
(Mutable)
I realize that some of those are more generic than others and that the implementation & runtime cost will vary between them.
The text was updated successfully, but these errors were encountered: