Refactor debug output in Cisco client tracking for improved clarity and consistency

This commit is contained in:
Yaro Kasear 2025-04-29 14:15:23 -05:00
parent d9e8a8eac9
commit 5e11cfcc80

View file

@ -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):