summaryrefslogtreecommitdiff
path: root/hacks/test_timings
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-10-14 15:57:23 +0200
committerCarl Hetherington <cth@carlh.net>2019-10-14 15:57:23 +0200
commitbc15431f597e7dc6ce0e2046084b770adf1b7cb4 (patch)
tree193a0e2eb86853ce536a7f71cfcbde3c41fede81 /hacks/test_timings
parentf9fe318f3c79e2fc244de56bf6fe0dc1c05fd252 (diff)
Rename and fix up hack script.
Diffstat (limited to 'hacks/test_timings')
-rw-r--r--hacks/test_timings29
1 files changed, 29 insertions, 0 deletions
diff --git a/hacks/test_timings b/hacks/test_timings
new file mode 100644
index 000000000..517d9ff44
--- /dev/null
+++ b/hacks/test_timings
@@ -0,0 +1,29 @@
+#!/usr/bin/python
+
+import sys
+
+if len(sys.argv) < 2:
+ print>>sys.stderr,'Syntax %s <log>' % sys.argv[0]
+ sys.exit(1)
+
+tests = {}
+
+with open(sys.argv[1]) as f:
+ while True:
+ l = f.readline()
+ if l == '':
+ break
+
+ s = l.split()
+ if len(s) > 2 and s[1] == 'Leaving' and s[7][-2:] == 'us':
+ tests[float(s[7][:-2]) / 1000000] = s[4][1:-2]
+
+def hms(x):
+ h = int(x) // 3600
+ x -= h * 3600
+ m = int(x) // 60
+ x -= m * 60
+ return '%02d:%02d:%02d' % (h, m, x)
+
+for x in sorted(tests):
+ print hms(x),tests[x]