tor_multipath_voip/scripts/parse_lat.py

10 lines
308 B
Python
Raw Normal View History

2019-10-16 14:56:29 +00:00
#!/usr/bin/python3
import sys,re
way=sys.argv[1]
for line in sys.stdin:
2019-10-18 15:29:49 +00:00
res = re.match(r".*Packet (\d+) latency (\d+)µs with flag (\d+) sent on link (\d+) with vanilla (\d+).*", line)
2019-10-16 14:56:29 +00:00
if not res: continue
2019-10-18 15:29:49 +00:00
pid,lat,flag,link,vanilla = res.groups()
print(f"{pid},{lat},{flag},{link},{vanilla},{way}")