module metrics_base
import model_utils
+import modelbuilder
import csv
import counter
import console
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
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
end
# Export the metric set in CSV format
- fun to_csv: CSVDocument do
- var csv = new CSVDocument
+ fun to_csv: CsvDocument do
+ var csv = new CsvDocument
+
+ csv.format = new CsvFormat('"', ';', "\n")
# set csv headers
csv.header.add("entry")
line.add("n/a")
end
end
- csv.lines.add(line)
+ csv.records.add(line)
end
return csv
end