def format_bytesize(num):
    for x in ['bytes','KB','MB','GB']:
        if num < 1024.0:
            return "%3.1f%s" % (num, x)
        num /= 1024.0
    return "%3.1f%s" % (num, 'TB')
Convert number of bytes to human readable string
dataset/ETHPy150Open datastax/cstar_perf/frontend/cstar_perf/frontend/lib/util.py/format_bytesize