# HG changeset patch # User Pierre-Yves David <pierre-yves.david@octobus.net> # Date 1568418627 -7200 # Sat Sep 14 01:50:27 2019 +0200 # Node ID 2bd442f065c184a0d1393c500114beffe2b023ff # Parent 5e0164a76aa0984804806bf926b69757317164d0 perfext: get better error output when the command call fails We get the actual command output instead of a traceback within the benchmark code. diff --git a/benchmarks/utils.py b/benchmarks/utils.py --- a/benchmarks/utils.py +++ b/benchmarks/utils.py @@ -499,6 +499,10 @@ # command does not exist for this version of perf.py # return NaN which is a "n/a" status for asv return None + except subprocess.CalledProcessError as exc: + msg = "calling perf command failed [%d]: %s %s" % (exc.returncode, command, args) + print(msg, file=sys.stderr) + print(exc.output, file=sys.stderr) def perfext(self, command, *args, **kwargs): """Use contrib/perf.py extension from mercurial to get a benchmark result"""