# Util for debugging channels/threads performance: should I publish a package?

**URL:** <https://discourse.julialang.org/t/util-for-debugging-channels-threads-performance-should-i-publish-a-package/55093>\
**Category:** General Usage\
**Tags:** package, channel\
**Created:** [February 11, 2021, 9:17pm UTC](https://discourse.julialang.org/t/util-for-debugging-channels-threads-performance-should-i-publish-a-package/55093 "2021-02-11T21:17:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pmilovanov](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pmilovanov/32/20965_2.png) [@pmilovanov](https://discourse.julialang.org/u/pmilovanov)\
**Post date:** [February 11, 2021, 9:17pm UTC](https://discourse.julialang.org/t/util-for-debugging-channels-threads-performance-should-i-publish-a-package/55093/1 "2021-02-11T21:17:18Z")

</div>

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](https://gist.github.com/pmilovanov/5ba67a9b5c95ffa72784a18615d7da8f)

---

<div class="post-metadata">

**Author:** ![pmilovanov](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pmilovanov/32/20965_2.png) [@pmilovanov](https://discourse.julialang.org/u/pmilovanov)\
**Post date:** [February 12, 2021, 8:29pm UTC](https://discourse.julialang.org/t/util-for-debugging-channels-threads-performance-should-i-publish-a-package/55093/2 "2021-02-12T20:29:14Z")

</div>

Bump

---

<div class="post-metadata">

**Author:** ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Post date:** [February 13, 2021, 5:37am UTC](https://discourse.julialang.org/t/util-for-debugging-channels-threads-performance-should-i-publish-a-package/55093/3 "2021-02-13T05:37:13Z")

</div>

I think there isn’t anything wrong in publishing it as a package.  
At least it is easy for yourself to find it back in the future.
