Skip to content
This repository was archived by the owner on Nov 17, 2020. It is now read-only.

Conversation

@gerhard
Copy link
Contributor

@gerhard gerhard commented Apr 23, 2019

B is used for powers of 10, e.g. 10^6 bytes = 1MB
iB is used for powers of 2, e.g. 2^20 bytes = 1MiB

Since the division is using a power of 2, the symbol used also needs to
be a power of 2.

Types of Changes

What types of changes does your code introduce to this project?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (correction or otherwise)
  • Cosmetics (whitespace, appearance)

Checklist

  • I have read the CONTRIBUTING.md document
  • I have signed the CA (see https://cla.pivotal.io/sign/rabbitmq)
  • All tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in related repositories

Further Comments

This is somewhat related to rabbitmq/rabbitmq-server#1987

Before this change, 93048832 bytes were shown as 89MB. After this change, they are shown as 89MiB. This applies to all units:

image

B is used for powers of 10, e.g. 10^6 bytes = 1MB
iB is used for powers of 2, e.g. 2^20 bytes = 1MiB

Since the division is using a power of 2, the symbol used also needs to
be a power of 2.

https://en.wikipedia.org/wiki/Byte
@michaelklishin michaelklishin merged commit 1bf3606 into master Apr 23, 2019
@michaelklishin michaelklishin deleted the fix_si_unit_symbol branch April 23, 2019 15:46
@michaelklishin michaelklishin added this to the 3.7.15 milestone Apr 23, 2019
michaelklishin added a commit that referenced this pull request Apr 23, 2019
Fix bytes prefix symbol

(cherry picked from commit 1bf3606)
@michaelklishin
Copy link
Contributor

Backported to v3.7.x.

@michaelklishin michaelklishin changed the title Fix bytes prefix symbol Fix info unit bytes suffix May 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants