summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2021-12-08 09:30:26 +0000
committerMatthew Pickering <matthewtpickering@gmail.com>2021-12-16 16:47:02 +0000
commit3cf2e80efd4eb516cbbc9925d06713b7cbc45a56 (patch)
treeecc7de36aac40b8ec37b57ac33822501ef095ce2
parent6cea73113e63650e3eeee9c187ae3de7ffc19af6 (diff)
downloadhaskell-wip/compare-metrics.tar.gz
testsuite: Format metric results with comma separatorwip/compare-metrics
As noted in #20763 the way the stats were printed was quite hard for a human to compare. Therefore we now insert the comma separator so that they are easier to compare at a glance. Before: ``` Baseline Test Metric value New value Change ----------------------------------------------------------------------------- Conversions(normal) run/alloc 107088.0 107088.0 +0.0% DeriveNull(normal) run/alloc 112050656.0 112050656.0 +0.0% InlineArrayAlloc(normal) run/alloc 1600040712.0 1600040712.0 +0.0% InlineByteArrayAlloc(normal) run/alloc 1440040712.0 1440040712.0 +0.0% InlineCloneArrayAlloc(normal) run/alloc 1600040872.0 1600040872.0 +0.0% MethSharing(normal) run/alloc 480097864.0 480097864.0 +0.0% T10359(normal) run/alloc 354344.0 354344.0 +0.0% ``` After ``` Baseline Test Metric value New value Change ---------------------------------------------------------------------------------- Conversions(normal) run/alloc 107,088 107,088 +0.0% DeriveNull(normal) run/alloc 112,050,656 112,050,656 +0.0% InlineArrayAlloc(normal) run/alloc 1,600,040,712 1,600,040,712 +0.0% InlineByteArrayAlloc(normal) run/alloc 1,440,040,712 1,440,040,712 +0.0% InlineCloneArrayAlloc(normal) run/alloc 1,600,040,872 1,600,040,872 +0.0% MethSharing(normal) run/alloc 480,097,864 480,097,864 +0.0% T10359(normal) run/alloc 354,344 354,344 +0.0% ``` Closes #20763
-rw-r--r--testsuite/driver/runtests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/testsuite/driver/runtests.py b/testsuite/driver/runtests.py
index bccd8ccc67..00564a48dc 100644
--- a/testsuite/driver/runtests.py
+++ b/testsuite/driver/runtests.py
@@ -400,9 +400,9 @@ def tabulate_metrics(metrics: List[PerfMetric]) -> None:
if x.baseline is not None else "",
"{}".format(x.baseline.perfStat.test_env)
if x.baseline is not None else "",
- "{:13.1f}".format(x.baseline.perfStat.value)
+ "{:13,d}".format(int(x.baseline.perfStat.value))
if x.baseline is not None else "",
- "{:13.1f}".format(x.stat.value),
+ "{:13,d}".format(int(x.stat.value)),
strDiff(x),
"{}".format(x.change.hint())
)) for x in sorted(metrics, key =