From c63f619b3a299522656b3ccdf896b3fb953f95f6 Mon Sep 17 00:00:00 2001 From: RV_SkeLe Date: Thu, 18 Dec 2025 12:51:13 +0100 Subject: [PATCH] Fix total MB calculation --- scripts/graph.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/graph.py b/scripts/graph.py index 3383367..e028dd9 100644 --- a/scripts/graph.py +++ b/scripts/graph.py @@ -21,7 +21,7 @@ def get_packet_totals(db_file, time_granularity="minute", outgoing_filter=None, SELECT batched_packets.packet_name, SUM(batched_packets.amount) AS total_amount, - SUM(batched_packets.amount * batched_packets.size_bytes) / 1e6 AS total_mb, + SUM(batched_packets.size_bytes) / 1e6 AS total_mb, strftime('{time_format}', datetime(batched_packets.collected_at / 1000, 'unixepoch')) AS time_period FROM batched_packets JOIN packet_bound ON batched_packets.packet_name = packet_bound.packet_name