-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Language statistics percentages don't add up to 100% #22023
Comments
This is more than likely due to rounding to 1decimal place. |
There are different things you can do to avoid such problems, like the largest remainder method. |
Then please have a look at |
Fix #22023 I've changed how the percentages for the language statistics are rounded because they did not always add up to 100% Now it's done with the largest remainder method, which makes sure that total is 100% Co-authored-by: Lauris BH <lauris@nix.lv>
Description
This is probably just a rounding bug, but it is still a little bit frustrating when you notice it.
As you can see from the screenshot, the percentages are
COBOL 45.7%
Assembly 43.2%
Shell 5.9%
Ruby 5.3%
which is 100.1% in total.
I've made a copy of my repo here:
https://try.gitea.io/hr98/aoc22-copy-percentage-bug
Gitea Version
Gitea version 1.17.3 built with GNU Make 4.1, go1.18.7 : bindata, sqlite, sqlite_unlock_notify
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
Git Version
git version 2.31.1
Operating System
Linux
How are you running Gitea?
Downloaded the binary and running as systemd service on Alma Linux 9.
Database
SQLite
The text was updated successfully, but these errors were encountered: