tshark test 3
All checks were successful
Build and Deploy MITM Webserver / build (push) Successful in 9s
All checks were successful
Build and Deploy MITM Webserver / build (push) Successful in 9s
This commit is contained in:
@@ -282,11 +282,14 @@ class TsharkManager:
|
||||
self._cache: Dict[Tuple[str, int, str, str, int, int, int], List[Dict[str, Any]]] = {}
|
||||
self._last_error_by_iface: Dict[str, str] = {}
|
||||
self._stats: Dict[str, Any] = {
|
||||
"raw_lines_total": 0,
|
||||
"events_total": 0,
|
||||
"events_useful": 0,
|
||||
"parse_failures": 0,
|
||||
"lookup_hits": 0,
|
||||
"backfill_updates_total": 0,
|
||||
"last_event_by_iface": {},
|
||||
"last_unparsed_line_by_iface": {},
|
||||
}
|
||||
self._lock = threading.Lock()
|
||||
|
||||
@@ -455,9 +458,14 @@ class TsharkManager:
|
||||
text = line.rstrip("\n")
|
||||
if not text:
|
||||
continue
|
||||
with self._lock:
|
||||
self._stats["raw_lines_total"] += 1
|
||||
|
||||
event = _parse_line(text, iface)
|
||||
if event is None:
|
||||
with self._lock:
|
||||
self._stats["parse_failures"] += 1
|
||||
self._stats["last_unparsed_line_by_iface"][iface] = text
|
||||
logger.debug("Ignoring unparsable tshark line on %s: %s", iface, text)
|
||||
continue
|
||||
|
||||
|
||||
Reference in New Issue
Block a user