mirror of
https://github.com/google/benchmark.git
synced 2024-11-26 07:32:19 +00:00
Clarify build type warning
This commit is contained in:
parent
006d23ccca
commit
25e46848f9
|
@ -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
|
||||
} // end namespace benchmark
|
||||
|
|
Loading…
Reference in a new issue