Skip to content
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

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

Merged
merged 2 commits into from
Aug 15, 2024
Merged

Conversation

yngvem
Copy link
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
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
13 checks passed
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