diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-05-19 00:45:35 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-05-20 21:56:28 +0200 |
| commit | c3983e1ced75c2205fb1c172e2ff4fa44fb569bb (patch) | |
| tree | f9e5e4332c90cfb576c593280884e04b9fc99f58 /hacks/test_timings | |
| parent | 0c1025064c77026aa8c733746092cb042030fdc7 (diff) | |
Improve test_timings script.
Diffstat (limited to 'hacks/test_timings')
| -rwxr-xr-x | hacks/test_timings | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/hacks/test_timings b/hacks/test_timings new file mode 100755 index 000000000..932fb395f --- /dev/null +++ b/hacks/test_timings @@ -0,0 +1,27 @@ +#!/usr/bin/python + +import sys + +if len(sys.argv) < 2: + print('Syntax %s <log>' % sys.argv[0], file=sys.stderr) + 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) == 8 and s[7][-2:] == 'us': + tests[float(s[7][:-2]) / 1000000] = s[4][1:-2] + +for t in sorted(tests): + s = int(t) + h = s // 3600 + s -= h * 3600 + m = s // 60 + s -= m * 60 + print("%30s %02d:%02d:%02d (%f)" % (tests[t], h, m, s, t)) |
