Clarify build type warning

This commit is contained in:
Dominic Hamon 2015-03-31 14:40:46 -04:00
parent 006d23ccca
commit 25e46848f9
3 changed files with 9 additions and 11 deletions

View file

@ -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;

View file

@ -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";

View file

@ -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
} // end namespace benchmark