Skip to content

Fix format_network_speed util function calculation - #562

Open
vjr wants to merge 1 commit into
mainfrom
vishal/fix-network-speed-format
Open

vjr wants to merge 1 commit into
mainfrom
vishal/fix-network-speed-format

Conversation

@vjr

@vjr vjr commented Sep 16, 2026

Copy link
Copy Markdown
Member

Fixes #561

We separate the formatting of values and units, using the IEC_UNITS flag for the former and excluding it for the latter.

This would cause the function to sometimes show the next higher unit for values close to the conversion borderline for IEC versus non-IEC unit values.

For example, if the provided network speed parameter is 1020 Mbit/s the non-IEC formatting would pick "Gbit/s" as the unit because it's over the 1000-base mark.

We separate the formatting of values and units, using the IEC_UNITS flag for the former and excluding it for the latter.
This would cause the function to sometimes show the next higher unit for values close to the conversion borderline for IEC versus non-IEC unit values.
For example, if the provided network speed parameter is 1020 Mbit/s the non-IEC formatting would pick "Gbit/s" as the unit because it's over the 1000-base mark.
@vjr vjr self-assigned this Sep 16, 2026
@vjr
vjr requested review from a team and stsdc September 16, 2026 13:09
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

Successfully merging this pull request may close these issues.

New format_network_speed util function sometimes erroneously shows Gbit/s instead of Mbit/s

1 participant