alive-progress icon indicating copy to clipboard operation
alive-progress copied to clipboard

Automatic units in stats for slow throughputs

Open bvolkmer opened this issue 3 years ago • 4 comments

I mainly use the meter for long-running processes, where also the increments take several minutes. So the unit of 1/s in the throughput is always 0.0, which does not say much.

It would be nice if it would adjust the unit accordingly. Starting with 1/s, if it is <1 it would be 1/m, then 1/h. Or add an option to set the unit manually. This probably could then also be used for the speed of the spinners (which is always very low for <1/s throughput).

bvolkmer avatar Mar 02 '21 13:03 bvolkmer

Humm, I see, I'd never seen an increment take several minutes... But it makes total sense, I just happen to have another open-source project that does just that! https://github.com/rsalmei/about-time... Look for Accuracy, second collapsible handler, for all the throughput units I support in there.

Well, I think it would increase the overhead a little, I'm going to think about either making it optional or making it update less times. Oh, and trying to measure the possible performance hit, before optimizing anything...

I'm in the process of releasing 2.0 (#51), but after that I can make this 👍

rsalmei avatar Mar 02 '21 17:03 rsalmei

Hi and thanks for the great library! I'm quite late to this, but could it also be possible to manually define a dimension for 1/s as for instance kb which would then print kb /s? That would be awesome for instance for up-/download progresses.

oschwengers avatar Aug 19 '21 15:08 oschwengers

Hey @oschwengers, thank you! Yes, this is planned! Look at #43 👍

rsalmei avatar Aug 19 '21 16:08 rsalmei

It's done! This will be included in the next release.

image

rsalmei avatar Jun 12 '22 18:06 rsalmei