From 6170ed7dabe1811a877fe682170f50c0148782d9 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Wed, 16 Oct 2019 16:56:29 +0200 Subject: [PATCH] simple script to parse latencies --- scripts/parse_lat.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 scripts/parse_lat.py diff --git a/scripts/parse_lat.py b/scripts/parse_lat.py new file mode 100755 index 0000000..424a32e --- /dev/null +++ b/scripts/parse_lat.py @@ -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}")