console-rs / indicatif

A command line progress reporting library for Rust
MIT License
4.36k stars 241 forks source link

Option to smooth ETA and *_per_second #394

Closed aawsome closed 1 year ago

aawsome commented 2 years ago

First, thanks a lot for this wonderful crate. It is awesome to use!

I have a minor issue, I have a workload with highly changing operation rates (in bytes per seconds) which is kind of desired behavior as sometimes caching is used and sometimes not. Now, displaying ETA and bytes_per_second works but is of course very oscillating. Is it possible to add an option which allows to smooth these value, e.g. that a longer time period is used for the calculation?

djc commented 1 year ago

With #539 merged, I'm going to close this issue as fixed because I believe we've made a great improvement to the smoothness of ETA and *_per_second. If you still run into issues with 0.17.5 or later, please file a new issue.

aawsome commented 1 year ago

Thanks a lot for your work @afontenot and @djc! I'll test 0.17.5 with and without a steady ticker. (Though I think I'll keep a steady ticker as I sometimes have have pauses for more than a second and also present an elapsed time - users would expect the elapsed time to be updated regularly)