tor_multipath_voip/scripts/parse_lat.py

10 lines
240 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:
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}")