add newline before daily and total summary

This commit is contained in:
Daniel Langbein 2022-10-18 12:55:53 +02:00
parent d83877e7e1
commit d644971b4b
2 changed files with 3 additions and 0 deletions

View File

@ -39,6 +39,7 @@ From 2022-09-25 22:14:50 until 2022-09-29 11:02:26:
2022-09-27: 1608 MB up 548 MB down 278 Connections 2022-09-27: 1608 MB up 548 MB down 278 Connections
2022-09-28: 774 MB up 423 MB down 281 Connections 2022-09-28: 774 MB up 423 MB down 281 Connections
2022-09-29: 760 MB up 314 MB down 136 Connections 2022-09-29: 760 MB up 314 MB down 136 Connections
Total: Total:
4297 MB up 1682 MB down 898 Connections 4297 MB up 1682 MB down 898 Connections
``` ```

View File

@ -25,6 +25,7 @@ def parse_log(log: str) -> None:
tps = [Throughput.from_str(line) for line in log.splitlines()] tps = [Throughput.from_str(line) for line in log.splitlines()]
tps = [tp for tp in tps if tp] tps = [tp for tp in tps if tp]
if len(tps) > 0: if len(tps) > 0:
print()
print(f'From {tps[0].dt} until {tps[-1].dt}:') print(f'From {tps[0].dt} until {tps[-1].dt}:')
grouped_by_day = {} grouped_by_day = {}
@ -40,6 +41,7 @@ def parse_log(log: str) -> None:
print(f'{day}: {tps_sum}') print(f'{day}: {tps_sum}')
tps_total += tps_sum tps_total += tps_sum
print()
print(f'Total:\n{tps_total}') print(f'Total:\n{tps_total}')