aboutsummaryrefslogtreecommitdiff
path: root/src/console_reporter.cc
diff options
context:
space:
mode:
authorIsmael <ijimenezm@hotmail.es>2016-05-18 21:25:00 +0200
committerIsmael <ijimenezm@hotmail.es>2016-05-18 21:25:00 +0200
commitb73dc22944cb933289bbdbf5bb6616dbfc50168f (patch)
treeeb9a7699b0b69c491c597949e2f03e66b5e870c7 /src/console_reporter.cc
parent27f0baa190b4ebd31436b3e8a89bee7fbdc50eb9 (diff)
downloadgoogle-benchmark-b73dc22944cb933289bbdbf5bb6616dbfc50168f.tar.gz
implemented Complexity for O(1)
Diffstat (limited to 'src/console_reporter.cc')
-rw-r--r--src/console_reporter.cc17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/console_reporter.cc b/src/console_reporter.cc
index 56bd3ce..0d8ab1d 100644
--- a/src/console_reporter.cc
+++ b/src/console_reporter.cc
@@ -72,13 +72,28 @@ void ConsoleReporter::ReportRuns(const std::vector<Run>& reports) {
Run mean_data;
Run stddev_data;
- BenchmarkReporter::ComputeStats(reports, &mean_data, &stddev_data);
+ BenchmarkReporter::ComputeStats(reports, mean_data, stddev_data);
// Output using PrintRun.
PrintRunData(mean_data);
PrintRunData(stddev_data);
}
+void ConsoleReporter::ReportComplexity(const std::vector<Run> & complexity_reports) {
+ if (complexity_reports.size() < 2) {
+ // We don't report asymptotic complexity data if there was a single run.
+ return;
+ }
+
+ Run bigO_data;
+ Run rms_data;
+ BenchmarkReporter::ComputeBigO(complexity_reports, bigO_data, rms_data);
+
+ // Output using PrintRun.
+ PrintRunData(bigO_data);
+ PrintRunData(rms_data);
+}
+
void ConsoleReporter::PrintRunData(const Run& result) {
// Format bytes per second
std::string rate;