metrics: display sums in to_console
authorAlexandre Terrasa <alexandre@moz-code.org>
Tue, 25 Mar 2014 21:28:26 +0000 (17:28 -0400)
committerAlexandre Terrasa <alexandre@moz-code.org>
Fri, 25 Apr 2014 01:58:49 +0000 (21:58 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

src/metrics/metrics_base.nit

index ee153de..e39cf51 100644 (file)
@@ -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