forked from TrueCloudLab/frostfs-node
[#903] config: support floating-point sizes
Rounding is done using the suffix boundary (i.e. floating point value with `gb` suffix will return size which is an integer number of megabytes). Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
e7fd980951
commit
aba09bb853
4 changed files with 31 additions and 5 deletions
|
@ -54,6 +54,9 @@
|
|||
"size_mb": "12m",
|
||||
"size_gb": "4g",
|
||||
"size_tb": "5 TB",
|
||||
"size_float": ".5t",
|
||||
"size_float_big": "14.123 gb",
|
||||
"size_i_am_not_very_clever": "12.12345678",
|
||||
"size_bytes": "2048b",
|
||||
"size_bytes_no_suffix": 123456
|
||||
},
|
||||
|
|
|
@ -47,6 +47,9 @@ sizes:
|
|||
size_mb: 12m
|
||||
size_gb: 4g
|
||||
size_tb: 5 TB
|
||||
size_float: .5t
|
||||
size_float_big: 14.123 gb
|
||||
size_i_am_not_very_clever: 12.12345678
|
||||
size_bytes: 2048b
|
||||
size_bytes_no_suffix: 123456
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue