I wrote some code for myself to better understand what’s going on with threads and channels in my app. It implements TrackingChannel
, a wrapper around a channel that measures how long take!
, put!
, fetch
ops took on that underlying channel and asynchronously reports these numbers to a StatsTracker
that keeps track of statistics using OnlineStats.jl
. Length of the channel’s buffer at the time of those ops is also tracked.
Would anybody else find this useful? I’m happy to publish this as a package or contribute to an existing package if it makes sense.
Code preview at the gist below. Pardon any non-julian code patterns; comments much appreciated.
https://gist.github.com/pmilovanov/5ba67a9b5c95ffa72784a18615d7da8f