]> rtime.felk.cvut.cz Git - linux-conf-perf.git/commitdiff
Update parse script for cyclictest
authorMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 28 Sep 2015 07:38:11 +0000 (09:38 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 28 Sep 2015 07:38:11 +0000 (09:38 +0200)
Previously, some successfully executed measurements had no value in the
database. Let's use explicit parsing script, which may (or may not) solve
this problem.

tests/cyclictest/parse

index e83090ace59c2fca507f1b95d186e582aff80542..75f29b8eee109312e1d3d0161fc8c95d104a7716 100755 (executable)
@@ -1,3 +1,10 @@
-#!/bin/bash
+#!/usr/bin/env python3
+import re
+import fileinput
 
-cat | grep -e "^! .* ok$" | sed -n '2p' | awk '{print $17}'
+result_re = re.compile("! T: 0 \(.*\) P:.* I:.* C:.* Min: *(?P<min>\d+) Act: *(?P<act>\d+) Avg: *(?P<avg>\d+) Max: *(?P<max>\d+) ok")
+
+for line in fileinput.input():
+    match = result_re.match(line)
+    if match:
+        print(match.group('max'))