I am using buffered Channels as a stream between different parts of my program, and I’d like to regularly find out how much of a buffered channel is actually used.
For example, if the channel is regularly empty, I know the producing task is a bottleneck, and if it is regularly full, I’ll know the consuming task is the bottleneck.
isready() is the closest I’ve come to getting information on this, but this can only tell me if the channel is empty. Is there a better way to do this?