From 5e11cfcc806219f02679b7f67b0815dc3bb3c613 Mon Sep 17 00:00:00 2001 From: Yaro Kasear Date: Tue, 29 Apr 2025 14:15:23 -0500 Subject: [PATCH] Refactor debug output in Cisco client tracking for improved clarity and consistency --- enrichment/indexed_capture.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/enrichment/indexed_capture.py b/enrichment/indexed_capture.py index 0445d68..1f640de 100644 --- a/enrichment/indexed_capture.py +++ b/enrichment/indexed_capture.py @@ -102,7 +102,6 @@ class IndexedCapture: if ssid: self.cisco_ssid_clients[ssid].append((timestamp, num_clients)) self.cisco_reported_clients.append(num_clients) - print(f"[DEBUG] Indexed {len(self.cisco_reported_clients)} Cisco client reports.") except (TypeError, ValueError): pass @@ -292,20 +291,20 @@ class IndexedCapture: if ssid not in self.cisco_ssid_clients: print(f"[DEBUG] No Cisco client data for SSID {ssid}") return 0 - + # DEBUG: print window details print(f"[DEBUG] Querying Cisco clients for SSID={ssid} between start_ts={start_ts} and end_ts={end_ts}") - + hits = [] for ts, count in self.cisco_ssid_clients[ssid]: print(f"[DEBUG] Cisco record ts={ts}, count={count}") if start_ts <= ts <= end_ts: print(f"[DEBUG] --> Included in window!") hits.append(count) - + if not hits: print(f"[DEBUG] No Cisco client counts matched window for SSID={ssid}") - + return round(mean(hits), 2) if hits else 0 def _cisco_max_clients(self, ssid, start_ts, end_ts):