fix unit conversion

This commit is contained in:
Daniel Langbein 2023-01-11 19:57:35 +01:00
parent ec2601b931
commit fb852ed92d

View File

@ -84,10 +84,10 @@ class Throughput:
# Units sorted from small to large. # Units sorted from small to large.
_unit_dict = { _unit_dict = {
'B': 1, 'B': 1,
'KB': 10 ** 3, 'KB': 1024,
'MB': 10 ** 6, 'MB': 1024 * 1024,
'GB': 10 ** 9, 'GB': 1024 * 1024 * 1024,
'TB': 10 ** 12, 'TB': 1024 * 1024 * 1024 * 1024,
} }
@classmethod @classmethod