refactor: implement packet parsing heuristics and introduce device-level state caching to throttle database writes and vitals updates
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import re
|
||||
from collections import Counter
|
||||
|
||||
with open("/home/prathiyuman/Prathiyuman/ContecMonitor/fiveparaminte-main/hl7_forwarder.log", "r") as f:
|
||||
content = f.read()
|
||||
|
||||
warnings = re.findall(r"unrecognized. Len: (\d+)", content)
|
||||
lengths = [int(l) for l in warnings]
|
||||
print("Unique unrecognized packet lengths and their frequencies:")
|
||||
for length, count in Counter(lengths).most_common():
|
||||
print(f" Length {length}: {count} times")
|
||||
Reference in New Issue
Block a user