boxine / django-huey-monitor

Django based tool for monitoring huey task queue: https://github.com/coleifer/huey
GNU General Public License v3.0
86 stars 20 forks source link

throughput formating for rate<1 #48

Closed formacube closed 2 years ago

formacube commented 3 years ago

throughput in different format depending if rate is higher or lower than 1

Hi, for throughputs which are below 1, and especially a lot below 1, the humanized throughput is not very informative and not obvious to interpret for human brain: image

image

I propose for rates <1 to change the humanize.throughput function to display in this case duration / unit.

In my case: 5.3 s/typology (instead of 0.19 typology/s) and 1.9 days/piece (instead of 0.00 piece/s)

formacube commented 3 years ago

any feedback ?

jedie commented 2 years ago

Your idea is nice. But it's not needed to reimplement: https://github.com/boxine/bx_django_utils/blob/master/bx_django_utils/humanize/time.py#L18-L63

I created this: https://github.com/boxine/django-huey-monitor/pull/51

formacube commented 2 years ago

that's great. Thanks Jedie