Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Req.: Human readable per_sec rate #637

Open
amandasaurus opened this issue Mar 18, 2024 · 3 comments
Open

Feature Req.: Human readable per_sec rate #637

amandasaurus opened this issue Mar 18, 2024 · 3 comments

Comments

@amandasaurus
Copy link

I am using indicatif to process lots of data, and it's great. My programme does hundreds of thousands to millions of iterations of second. The {per_sec} template will show me the rate to 4 decimal places (e.g. 120,399,714.0565/s). That's too many numbers.

Can we get a per_sec_human template variable which will print something like 120 M/s in this case?

@djc
Copy link
Member

djc commented Mar 18, 2024

If you submit a PR I'd be okay with reviewing/merging it. Arguably the human formatting should have been more like an orthogonal filter from the start...

@tgross35
Copy link

tgross35 commented Jul 4, 2024

Could this be something like a :short suffix instead, to print any number with k/M/G prefixes? I would love it for other options, so {pos:short}/{len:short} ({per_sec:short}) could print 143M/4G (1.0M/s) (currently 143288000/4294967295 (1,008,174.0894/s)).

@djc
Copy link
Member

djc commented Jul 5, 2024

@tgross35 something like that sounds interesting... Maybe display 3 significant digits, so it could be 143 or 7.21k or 39.4M?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants