Pretty print the metric results in console

Property definitions

nitc $ Metric :: to_console
	# Pretty print the metric results in console
	fun to_console(indent: Int, colors: Bool) do
		if values.is_empty then
			if colors then
				print "{"\t" * indent}{name}: {desc} -- nothing".green
			else
				print "{"\t" * indent}{name}: {desc} -- nothing"
			end
			return
		end

		var max = self.max
		var min = self.min
		if colors then
			print "{"\t" * indent}{name}: {desc}".green
			print "{"\t" * indent}  avg: {avg}".light_gray
			print "{"\t" * indent}  max: {max} ({self[max]})".light_gray
			print "{"\t" * indent}  min: {min} ({self[min]})".light_gray
			print "{"\t" * indent}  std: {std_dev}".light_gray
		else
			print "{"\t" * indent}{name}: {desc}"
			print "{"\t" * indent}  avg: {avg}"
			print "{"\t" * indent}  max: {max} ({self[max]})"
			print "{"\t" * indent}  min: {min} ({self[min]})"
			print "{"\t" * indent}  std: {std_dev}"
		end
	end
src/metrics/metrics_base.nit:183,2--209,4

nitc $ IntMetric :: to_console
	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
src/metrics/metrics_base.nit:277,2--284,4

nitc $ FloatMetric :: to_console
	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
src/metrics/metrics_base.nit:361,2--368,4