Get or create the global TrafficAnalyzer instance
(shared_data=None, interface: str = None)
| 1709 | """Count alerts grouped by severity level""" |
| 1710 | counts = {level.value: 0 for level in TrafficAlertLevel} |
| 1711 | for alert in self.alerts: |
| 1712 | counts[alert.level.value] += 1 |
| 1713 | return counts |
| 1714 | |
| 1715 | def _count_alerts_by_category(self) -> Dict[str, int]: |
| 1716 | """Count alerts grouped by category""" |
| 1717 | counts = defaultdict(int) |
| 1718 | for alert in self.alerts: |
| 1719 | counts[alert.category] += 1 |
nothing calls this directly
no test coverage detected