mirror of
https://codeberg.org/privacy1st/snowflake-stats
synced 2024-12-23 01:56:04 +01:00
fix unit conversion
This commit is contained in:
parent
ec2601b931
commit
fb852ed92d
8
main.py
8
main.py
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user