Skip to content

Use KiB and MiB as units instead of kB and MB.#199

Merged
corona10 merged 2 commits intopsf:mainfrom
yngvem:si-units
Aug 15, 2024
Merged

Use KiB and MiB as units instead of kB and MB.#199
corona10 merged 2 commits intopsf:mainfrom
yngvem:si-units

Conversation

@yngvem
Copy link
Copy Markdown
Contributor

@yngvem yngvem commented Aug 9, 2024

Previously, pyperf stated the memory usage as kB and MB, while strictly speaking, it was measured in KiB and MiB.
This commit makes it clear that the memory is measured using 2^10 and 2^20 bytes, not 10^3 and 10^6.

Closes #198

Example output:

$ python3 -m pyperf timeit '[1,2]*1000' --track-memory
.....................
Mean +- std dev: 10.2 MiB +- 78.2 kiB

Previously, pyperf stated the memory usage as kB and MB, while strictly
speaking, it was measured in KiB and MiB.
This commit makes it clear that the memory is measured using 2^10 and
2^20 bytes, not 10^3 and 10^6.
Copy link
Copy Markdown
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@corona10 corona10 merged commit 432c419 into psf:main Aug 15, 2024
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.

Minor issue regarding memory units (kB vs KiB)

3 participants