Merge pull request #111 from google/buildtype_log
Clarify build type warning
diff --git a/src/console_reporter.cc b/src/console_reporter.cc
index 7a99dfb..7faed20 100644
--- a/src/console_reporter.cc
+++ b/src/console_reporter.cc
@@ -41,16 +41,13 @@
}
#ifndef NDEBUG
- std::cerr << "Build Type: DEBUG\n";
+ std::cerr << "***WARNING*** Library was built as DEBUG. Timings may be "
+ "affected.\n";
#endif
- int output_width =
- fprintf(stdout,
- "%-*s %10s %10s %10s\n",
- static_cast<int>(name_field_width_),
- "Benchmark",
- "Time(ns)", "CPU(ns)",
- "Iterations");
+ int output_width = fprintf(stdout, "%-*s %10s %10s %10s\n",
+ static_cast<int>(name_field_width_), "Benchmark",
+ "Time(ns)", "CPU(ns)", "Iterations");
std::cout << std::string(output_width - 1, '-') << "\n";
return true;
diff --git a/src/csv_reporter.cc b/src/csv_reporter.cc
index 4d4e569..a5e8937 100644
--- a/src/csv_reporter.cc
+++ b/src/csv_reporter.cc
@@ -39,7 +39,8 @@
}
#ifndef NDEBUG
- std::cerr << "Build Type: DEBUG\n";
+ std::cerr << "***WARNING*** Library was built as DEBUG. Timings may be "
+ "affected.\n";
#endif
std::cout << "name,iterations,real_time,cpu_time,bytes_per_second,"
"items_per_second,label\n";
diff --git a/src/json_reporter.cc b/src/json_reporter.cc
index c816597..961e3d1 100644
--- a/src/json_reporter.cc
+++ b/src/json_reporter.cc
@@ -84,7 +84,7 @@
#else
const char build_type[] = "debug";
#endif
- out << indent << FormatKV("build_type", build_type) << "\n";
+ out << indent << FormatKV("library_build_type", build_type) << "\n";
// Close context block and open the list of benchmarks.
out << inner_indent << "},\n";
out << inner_indent << "\"benchmarks\": [\n";
@@ -162,4 +162,4 @@
out << '\n';
}
-} // end namespace benchmark
\ No newline at end of file
+} // end namespace benchmark