simple script to parse latencies

This commit is contained in:
Quentin 2019-10-16 16:56:29 +02:00
parent e8c2da7218
commit 6170ed7dab

9
scripts/parse_lat.py Executable file
View file

@ -0,0 +1,9 @@
#!/usr/bin/python3
import sys,re
way=sys.argv[1]
for line in sys.stdin:
res = re.match(r".*Packet (\d+) latency (\d+)µs with flag (\d+).*", line)
if not res: continue
pid,lat,flag = res.groups()
print(f"{pid},{lat},{flag},{way}")