revsetbenchmark: do not abort on failure to run a revset
authorPierre-Yves David <pierre-yves.david@fb.com>
Sat, 20 Jun 2015 16:22:10 -0700
changeset 25646 57e7a060a06f
parent 25645 977102cb12fc
child 25647 46a96dd4d976
revsetbenchmark: do not abort on failure to run a revset Instead of aborting the whole process, we just skip entry for revset that failed to run.
contrib/revsetbenchmarks.py
--- a/contrib/revsetbenchmarks.py	Mon Jun 22 10:11:31 2015 -0700
+++ b/contrib/revsetbenchmarks.py	Sat Jun 20 16:22:10 2015 -0700
@@ -62,7 +62,7 @@
             print >> sys.stderr, '(no ouput)'
         else:
             print >> sys.stderr, exc.output
-        sys.exit(exc.returncode)
+        return None
 
 outputre = re.compile(r'! wall (\d+.\d+) comb (\d+.\d+) user (\d+.\d+) '
                       'sys (\d+.\d+) \(best of (\d+)\)')
@@ -160,8 +160,13 @@
 def printresult(variants, idx, data, maxidx, verbose=False, reference=_marker):
     """print a line of result to stdout"""
     mask = '%%0%ii) %%s' % idxwidth(maxidx)
+
     out = []
     for var in variants:
+        if data[var] is None:
+            out.append('error   ')
+            out.append(' ' * 4)
+            continue
         out.append(formattiming(data[var]['wall']))
         if reference is not _marker:
             factor = None