feat: improved error message

This commit is contained in:
Daniel Langbein 2023-06-21 19:36:51 +02:00
parent c760ce3a98
commit 3908d5129e

View File

@ -25,9 +25,8 @@ class MemoryLogger(Logger):
def get_warn_data(self, data: list[any]) -> WarnData:
used_mb = data[1]
total_available_mb = data[3]
message = f'Memory usage ist at {used_mb} MB of {total_available_mb} MB'
used = used_mb / total_available_mb
message = f'Memory usage ist at {used_mb} MB of {total_available_mb} MB ({round(used*100,2)}%)'
return WarnData(data[0], used, message)
def read_data(self) -> list[any]: