projects
/
dcpomatic.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Change end() to only do one thing, and copy the required stuff into pause()
[dcpomatic.git]
/
hacks
/
test_timings
1
#!/usr/bin/python
2
3
import sys
4
5
if len(sys.argv) < 2:
6
file = sys.stdin
7
else:
8
file = open(sys.argv[1])
9
10
tests = {}
11
12
while True:
13
l = file.readline()
14
if l == '':
15
break
16
17
s = l.split()
18
if len(s) == 8 and s[7][-2:] == 'us':
19
tests[float(s[7][:-2]) / 1000000] = s[4][1:-2]
20
21
for t in sorted(tests):
22
s = int(t)
23
h = s // 3600
24
s -= h * 3600
25
m = s // 60
26
s -= m * 60
27
print("%50s %02d:%02d:%02d (%f)" % (tests[t], h, m, s, t))