From 8d35fc9f2d5b7dd7af28f8029c18137253765498 Mon Sep 17 00:00:00 2001 From: Pieter Olivier Date: Sun, 3 Nov 2024 11:30:45 +0100 Subject: [PATCH] Showing mean with two digit precision --- .../rascal/tests/concrete/recovery/RecoveryTestSupport.rsc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/org/rascalmpl/library/lang/rascal/tests/concrete/recovery/RecoveryTestSupport.rsc b/src/org/rascalmpl/library/lang/rascal/tests/concrete/recovery/RecoveryTestSupport.rsc index 5a8b4ededac..080010c465d 100644 --- a/src/org/rascalmpl/library/lang/rascal/tests/concrete/recovery/RecoveryTestSupport.rsc +++ b/src/org/rascalmpl/library/lang/rascal/tests/concrete/recovery/RecoveryTestSupport.rsc @@ -327,7 +327,7 @@ void printFrequencyTableStats(str label, FrequencyTable frequencyTable, str unit if (ninetyFivePercentile == -1 && cumulativeCount >= ninetyFivePercentileLimit) { ninetyFivePercentile = val; - } + } total += val*count; @@ -340,7 +340,7 @@ void printFrequencyTableStats(str label, FrequencyTable frequencyTable, str unit if (totalCount == 0) { print("-"); } else { - int mean = total/totalCount; + num mean = round(toReal(total)/totalCount, 0.01); print(right("", statFieldWidth)); print(right("", statFieldWidth)); print(right("", statFieldWidth));