add play versions that refer to old frames
[sparrow.git] / interlace-times.py
blobfb89175d24052a181b6c551b708b0b93fd9beca0
1 #!/usr/bin/python
2 import sys, os
3 from itertools import izip
5 fn1, fn2 = sys.argv[1:3]
7 #use on logs created by
9 #make TEST_OPTIONS='timer=1 reload=dumpfiles/xx.dump' test
11 # ideally keeping the camera in position
13 f1 = open(fn1)
14 f2 = open(fn2)
16 print "%s %s" % (fn1, fn2)
17 for l1, l2 in izip(f1, f2):
18 s1, t1 = l1.strip().split()
19 s2, t2 = l2.strip().split()
20 ratio = float(t1) / float(t2)
21 if ratio > 1.1:
22 fmt = "%s %6s %2.3f >%6s"
23 elif ratio < 1 / 1.1:
24 fmt = "%s %6s < %2.3f %6s"
25 else:
26 fmt = "%s %6s %2.3f %6s"
28 print fmt % (s1, t1, ratio, t2)