From 9c6e04977bb5f2f591f45d3bc7a50d3c499d3885 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Tue, 11 Jun 2024 19:40:19 -0700 Subject: [PATCH] rm --- selfdrive/debug/internal/qlog_size.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/selfdrive/debug/internal/qlog_size.py b/selfdrive/debug/internal/qlog_size.py index c745c2f7d1..cee96dc1fc 100755 --- a/selfdrive/debug/internal/qlog_size.py +++ b/selfdrive/debug/internal/qlog_size.py @@ -13,7 +13,6 @@ MIN_SIZE = 0.5 # Percent size of total to show as separate entry def make_pie(msgs, typ): - msgs_by_type = defaultdict(list) for m in msgs: msgs_by_type[m.which()].append(m.as_builder().to_bytes()) @@ -21,11 +20,10 @@ def make_pie(msgs, typ): length_by_type = {k: len(b"".join(v)) for k, v in msgs_by_type.items()} compressed_length_by_type = {k: len(bz2.compress(b"".join(v))) for k, v in msgs_by_type.items()} + total = sum(compressed_length_by_type.values()) real_total = len(bz2.compress(b"".join([m.as_builder().to_bytes() for m in msgs]))) uncompressed_total = len(b"".join([m.as_builder().to_bytes() for m in msgs])) - total = sum(compressed_length_by_type.values()) - sizes = sorted(compressed_length_by_type.items(), key=lambda kv: kv[1]) print("name - comp. size (uncomp. size)")