summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-04-27 14:02:49 -0400
committerBen Gamari <ben@smart-cactus.org>2022-04-28 00:38:12 -0400
commitf2089337c0881e2cc369f65e8da5a73d77a57951 (patch)
tree6bccabf303472e2104eaa29e0126c4df2c8e745a
parentd65a9e03f1bcf8e8748094a7f6e1ffd3858b1b86 (diff)
downloadhaskell-wip/testsuite-sets.tar.gz
testsuite/driver: Don't tabulate perf metrics if there aren't anywip/testsuite-sets
Previously we would attempt to tabulate perf metrics even if no stats tests were run. However, this failed as we attempted to take `min` of an empty list.
-rw-r--r--testsuite/driver/runtests.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/testsuite/driver/runtests.py b/testsuite/driver/runtests.py
index cc0d85f70c..724000ba81 100644
--- a/testsuite/driver/runtests.py
+++ b/testsuite/driver/runtests.py
@@ -382,6 +382,10 @@ def geometric_mean(xs):
return 1
def tabulate_metrics(metrics: List[PerfMetric]) -> None:
+ if metrics == []:
+ print("No perf metrics to tabulate.")
+ return
+
abbrevLen = get_abbrev_hash_length()
hasBaseline = any([x.baseline is not None for x in metrics])
baselineCommitSet = set([x.baseline.commit for x in metrics if x.baseline is not None])