added total bytes r/s + updated teh view

This commit is contained in:
Aryan Singh committed 2026-09-27 21:02:18 -05:00
1 parent af0e9d423d
commit 6822da6e34
2 files changed
+39 -4

No files matched your search

+10
View File
@@ -73,6 +73,8 @@ def render(lines):
mode = "?"
drop_rate = "?"
sent_bytes = "?"
received_bytes = "?"
now = time.time()
@@ -94,6 +96,10 @@ def render(lines):
mode = pieces[0].split(":", 1)[1].strip()
drop_rate = pieces[1].split(":", 1)[1].strip()
if len(pieces) > 2:
sent_bytes = pieces[2].split(":", 1)[1].strip()
if len(pieces) > 3:
received_bytes = pieces[3].split(":", 1)[1].strip()
except Exception:
pass
@@ -166,6 +172,10 @@ def render(lines):
f"{GRAY}|{RESET} "
f"{BOLD}{CYAN}DROP:{RESET} "
f"{WHITE}{drop_rate}%{RESET}"
f" {GRAY}|{RESET} "
f"{BOLD}{CYAN}TOTAL TX:{RESET} {WHITE}{sent_bytes} B{RESET}"
f" {GRAY}|{RESET} "
f"{BOLD}{CYAN}TOTAL RX:{RESET} {WHITE}{received_bytes} B{RESET}"
f"{CLEAR_LINE}"
)