summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2021-12-08 09:30:26 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-12-17 21:22:08 -0500
commit9d77976d02836594c74a21e170f763b42048fd04 (patch)
treeb0bfd26a93d2e07d0b8da0db7f530c8d6d8b3d66
parent5d5620bc1001c6a0689c57c23272b398ae9937d1 (diff)
downloadhaskell-9d77976d02836594c74a21e170f763b42048fd04.tar.gz
testsuite: Format metric results with comma separator
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 =