diff --git a/pyperf/_formatter.py b/pyperf/_formatter.py index 11b40bc5..6c3a1eea 100644 --- a/pyperf/_formatter.py +++ b/pyperf/_formatter.py @@ -32,7 +32,7 @@ def format_filesize(size): if size > 10 * 1024 * 1024: return '%.1f MiB' % (size / (1024.0 * 1024.0)) - return '%.1f kiB' % (size / 1024.0) + return '%.1f KiB' % (size / 1024.0) def format_filesizes(sizes): diff --git a/pyperf/tests/test_perf_cli.py b/pyperf/tests/test_perf_cli.py index d5ed5890..6423c52b 100644 --- a/pyperf/tests/test_perf_cli.py +++ b/pyperf/tests/test_perf_cli.py @@ -556,13 +556,13 @@ def test_dump(self): def test_dump_track_memory(self): expected = """ Run 1: calibrate the number of loops: 2^15 - - calibrate 1: 7188.0 kiB (loops: 2^15) + - calibrate 1: 7188.0 KiB (loops: 2^15) Run 2: 0 warmups, 1 value, 2^15 loops - - value 1: 7188.0 kiB + - value 1: 7188.0 KiB Run 3: 0 warmups, 1 value, 2^15 loops - - value 1: 7192.0 kiB + - value 1: 7192.0 KiB Run 4: 0 warmups, 1 value, 2^15 loops - - value 1: 7208.0 kiB + - value 1: 7208.0 KiB """ filename = os.path.join(TESTDIR, 'track_memory.json') stdout = self.run_command('dump', filename) diff --git a/pyperf/tests/test_utils.py b/pyperf/tests/test_utils.py index 3aeffe64..edf8549c 100644 --- a/pyperf/tests/test_utils.py +++ b/pyperf/tests/test_utils.py @@ -146,7 +146,7 @@ def test_format_filesize(self): self.assertEqual(format_filesize(1), '1 byte') self.assertEqual(format_filesize(10 * 1024), - '10.0 kiB') + '10.0 KiB') self.assertEqual(format_filesize(12.4 * 1024 * 1024), '12.4 MiB')