Commit 66747446 by Dominic Hamon

Merge pull request #111 from google/buildtype_log

Clarify build type warning
parents 006d23cc 25e46848
......@@ -41,16 +41,13 @@ bool ConsoleReporter::ReportContext(const Context& context) {
}
#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;
......
......@@ -39,7 +39,8 @@ bool CSVReporter::ReportContext(const Context& context) {
}
#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";
......
......@@ -84,7 +84,7 @@ bool JSONReporter::ReportContext(const Context& context) {
#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 @@ void JSONReporter::PrintRunData(Run const& run) {
out << '\n';
}
} // end namespace benchmark
\ No newline at end of file
} // end namespace benchmark
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment