Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #208 +/- ##
===========================================
- Coverage 83.83% 44.94% -38.90%
===========================================
Files 91 82 -9
Lines 20246 13552 -6694
Branches 20246 13552 -6694
===========================================
- Hits 16974 6091 -10883
- Misses 2926 7251 +4325
+ Partials 346 210 -136 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@XiangpengHao I just need to collect some metrics both without and with collecting tokio task metrics and compare whether this impacts the performance of the application overall. |
|
Currently with my naive implementation I'm seeing that the performance metrics timings are a bit better without the task metrics. The flamegraphs also show a large chunk dealing with collecting task metrics. I'll likely need to refactor this to improve performance. |
happy to see that you're using this dashboard! This looks very cool |
* Consolidate tokio tasks so only one is spawned * Update the update_high_mark function to use fetch_max * Use loop for metrics collection instead of iterating over monitor intervals
|
I'll set this PR ready for review and we can make any refinements you see fit. Could be nice to incorporate these metrics in to the admin dashboard as well. @XiangpengHao |
|
Thank you @devanbenz , I plan to take a look at this in the next few days! |
|
Sorry for the delay, I took a high level look -- this is super cool @devanbenz I plan to educate myself a bit more about tokio_unstable and understand how the metrics work under the hood. |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 10 |
| Duplication | 0 |
TIP This summary will be updated as you push new changes. Give us feedback





This PR adds metrics collection for tokio tasks and polling statistics. Gathered some ideas from here and put together the following metrics to be collected.
total_tasks_nis the amount of tasks spawned during runtimetotal_slow_poll_nis the number of slow taskstotal_poll_nis the amount of tasks in a polling statemean_poll_duration_msshows how long polls are taking on average in millisecondsmean_idle_duration_msshows the average idle duration in millisecondsI think the most interesting metric as we explore the different IO methods will be
mean_idle_duration_msas described by the link I referenced above:Did mean_idle_duration increase?
Overall different reasons for accounting these metrics can be seen here and in various sections throughout this document.
This PR is meant to be a building block so we can include these metrics via an admin server endpoint.