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

Percentage complete display rounding issue #1713

Closed
pR0Ps opened this issue Sep 26, 2019 · 1 comment · Fixed by #1716
Closed

Percentage complete display rounding issue #1713

pR0Ps opened this issue Sep 26, 2019 · 1 comment · Fixed by #1716

Comments

@pR0Ps
Copy link
Contributor

pR0Ps commented Sep 26, 2019

What version of this package are you using?
v0.21.0

What operating system, Node.js, and npm version?
macOS 10.14.6 (desktop application)

What happened?
The screenshot attached below shows a torrent at 99% downloaded. However, the completion percentage of each individual file has been rounded up to 100%. This makes it impossible to tell which of the file(s) is incomplete. In this specific case, I verified with another client that the torrent is 99.96% complete overall and one of the files is 99.71% complete.

What did you expect to happen?
I would expect that if a file is not fully complete, that it would not state "100%".

Possible solutions:

  • Always round percentages down: Since percentages measure "completeness", it's generally not that bad if 0.99999% is displayed as 0% instead of 1%, as both clearly communicate "nowhere near done". It's a bit more critical that 99.99999% is clearly communicated to mean "not fully complete". This is already done for the total completion percentage.
  • Special cases: If it's important to communicate the "has started" aspect of the 0.99999% case, special cases for 99% and 1% could be added (ie. show "1%" if >0% and <1%, show "99%" if >99% and <100%, otherwise round normally).

Personally, I'd also like if the percentages could be a bit more accurate (1 decimal place? 2?) but I understand that's more of a look-and-feel choice, not a bug (see #50)

Are you willing to submit a pull request to fix this bug?
Yes. I'll have a PR submitted in a few days that floors the percentage for the individual files before displaying them.

Screenshot (irrelevant information redacted):
Screen Shot 2019-09-26 at 6 56 33 PM

@feross
Copy link
Member

feross commented Oct 1, 2019

These changes sound great and I agree this should be fixed. Thank you for your attention to detail. Looking forward to your pull request.

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

Successfully merging a pull request may close this issue.

2 participants