mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-30 03:30:49 +00:00
This utility function converts a potentially large number to a compact representation, composed of at most 4 digits and a letter appropriate to the power of two the number has to multiplied with to arrive to the original number (with some loss of precision). The different powers of two are the conventional 2 ** (N * 10) variants: * N=0: (B)ytes * N=1: (K)bytes * N=2: (M)bytes * N=3: (G)bytes * N=4: (T)bytes Examples: * 87665 will be converted to 87K * 1024 will be converted to 1K
1.8 KiB
1.8 KiB