From: Alexandre Terrasa Date: Tue, 25 Mar 2014 21:28:26 +0000 (-0400) Subject: metrics: display sums in to_console X-Git-Tag: v0.6.6~102^2~1 X-Git-Url: http://nitlanguage.org metrics: display sums in to_console Signed-off-by: Alexandre Terrasa --- diff --git a/src/metrics/metrics_base.nit b/src/metrics/metrics_base.nit index ee153de..e39cf51 100644 --- a/src/metrics/metrics_base.nit +++ b/src/metrics/metrics_base.nit @@ -251,6 +251,15 @@ class IntMetric end return above end + + redef fun to_console(indent, colors) do + super + if colors then + print "{"\t" * indent} sum: {sum}".light_gray + else + print "{"\t" * indent} sum: {sum}" + end + end end # A Metric that collects float datas @@ -319,6 +328,16 @@ class FloatMetric end return above end + + redef fun to_console(indent, colors) do + super + if colors then + print "{"\t" * indent} sum: {sum}".light_gray + else + print "{"\t" * indent} sum: {sum}" + end + end + end # A MetricSet is a metric holder