Format bytes to human readable format
(bytes_value)
| 957 | |
| 958 | @staticmethod |
| 959 | def _format_bytes(bytes_value): |
| 960 | """Format bytes to human readable format""" |
| 961 | for unit in ['B', 'KB', 'MB', 'GB']: |
| 962 | if bytes_value < 1024.0: |
| 963 | return f"{bytes_value:.1f} {unit}" |
| 964 | bytes_value /= 1024.0 |
| 965 | return f"{bytes_value:.1f} TB" |
| 966 | |
| 967 | @staticmethod |
| 968 | def _format_timestamp(timestamp): |