1
0
mirror of https://github.com/google/benchmark.git synced 2025-04-29 14:30:37 +08:00

User counters: fix misplaced newline in console reporter header.

This commit is contained in:
Joao Paulo Magalhaes 2017-04-27 19:22:36 +01:00
parent 2d1a34626f
commit 409f35da50

View File

@ -53,11 +53,10 @@ bool ConsoleReporter::ReportContext(const Context& context) {
void ConsoleReporter::PrintHeader(const Run& run) {
std::string str =
FormatString("%-*s %13s %13s %10s\n", static_cast<int>(name_field_width_),
"Benchmark", "Time", "CPU", "Iterations");
if(!run.counters.empty()) {
str += " UserCounters...";
}
FormatString("%-*s %13s %13s %10s%s\n", static_cast<int>(name_field_width_),
"Benchmark", "Time", "CPU", "Iterations",
(run.counters.empty() ? "" : " UserCounters...")
);
std::string line = std::string(str.length(), '-');
GetOutputStream() << line << "\n" << str << line << "\n";
}