summaryrefslogtreecommitdiff
path: root/hacks/test_timings
blob: 05c6805136ea19ad80f8b2fa3bd3691c0d0f8198 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/python

import sys

if len(sys.argv) < 2:
    file = sys.stdin
else:
    file = open(sys.argv[1])

tests = {}

while True:
    l = file.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("%50s %02d:%02d:%02d (%f)" % (tests[t], h, m, s, t))