-
-
Notifications
You must be signed in to change notification settings - Fork 884
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
Incorrect conversion between bps, kbps, mbps #2230
Comments
wat? |
To add an example Looking at the stats application -In interface mode -> open stats (network in Bytes to match activity mon). You will see ~12.5MB/s (100Mbps). If we undo the use of 1024 and replace it with 1000 we will see expected values When scaling network speeds, you use multiples of 1000, not 1024. Network speeds are a metric conversion vs storage/memory being based on binary multiples. Currently the network information is calculating Mebi(bits/bytes) per second instead of Mega(bits/bytes) per second. Both are valid numbers, however Mega is what is reflected by speedtest applications, os network tabs, etc. I am slow to trace things out here, but I think it stems from the reuse of the the units or getReadableMemory helpers. |
To be pedantic this is the old discussion about metric vs binary units. KB vs KiB, MB vs MiB, etc. Originally computer people used the units wrong, i.e. to mean 1 KB = 1024 Bytes. If the current numbers use the binary (1024) multiplier then the units should be KiB, MiB, GiB, … See https://en.wikipedia.org/wiki/Kilobyte I have no opinion on what values should be displayed. But it should be noted that practically all marketing material and end-user documentation, including the Finder on macOS, have been using the metric units (1 KB = 1000) for quite a while now. The only notable exception seems to be RAM size as no one would understand why a machine has e.g. 8.59 GB of RAM instead of 8 GB (actually 8 GiB). |
thx, I will take a look at this later today |
I don't even know that macOS uses metric and not binary system. I will change that in the Stats to fit the macOS calculations. |
Describe the bug
It looks like a factor of 1024 is being used to convert between bps, kbps, mbps, gbps. While appropriate for storage/memory, network throughput needs to be scaled as a factor of 1000 (1kbps = 1000bps, 1mbps = 1000000bps, etc). This would also be applicable for B, KB, MB, GB as well.
Details:
The text was updated successfully, but these errors were encountered: