changeset 25646:57e7a060a06f

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.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Sat, 20 Jun 2015 16:22:10 -0700
parents 977102cb12fc
children 46a96dd4d976
files contrib/revsetbenchmarks.py
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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