Commit ee8e37c6 by Eric Fiselier

Fix bad merge which caused the benchmark name to be printed twice

parent 6a45324e
...@@ -100,11 +100,14 @@ void ConsoleReporter::ReportComplexity(const std::vector<Run> & complexity_repor ...@@ -100,11 +100,14 @@ void ConsoleReporter::ReportComplexity(const std::vector<Run> & complexity_repor
} }
void ConsoleReporter::PrintRunData(const Run& result) { void ConsoleReporter::PrintRunData(const Run& result) {
ColorPrintf(COLOR_GREEN, "%-*s ", auto name_color = (result.report_big_o || result.report_rms)
name_field_width_, result.benchmark_name.c_str()); ? COLOR_BLUE : COLOR_GREEN;
ColorPrintf(name_color, "%-*s ", name_field_width_,
result.benchmark_name.c_str());
if (result.error_occurred) { if (result.error_occurred) {
ColorPrintf(COLOR_RED, "ERROR OCCURRED: \'%s\'", result.error_message.c_str()); ColorPrintf(COLOR_RED, "ERROR OCCURRED: \'%s\'",
result.error_message.c_str());
ColorPrintf(COLOR_DEFAULT, "\n"); ColorPrintf(COLOR_DEFAULT, "\n");
return; return;
} }
...@@ -125,10 +128,6 @@ void ConsoleReporter::PrintRunData(const Run& result) { ...@@ -125,10 +128,6 @@ void ConsoleReporter::PrintRunData(const Run& result) {
const char* timeLabel; const char* timeLabel;
std::tie(timeLabel, multiplier) = GetTimeUnitAndMultiplier(result.time_unit); std::tie(timeLabel, multiplier) = GetTimeUnitAndMultiplier(result.time_unit);
ColorPrintf((result.report_big_o ||result.report_rms) ? COLOR_BLUE :
COLOR_GREEN, "%-*s ",
name_field_width_, result.benchmark_name.c_str());
if(result.report_big_o) { if(result.report_big_o) {
std::string big_o = result.report_big_o ? GetBigO(result.complexity) : ""; std::string big_o = result.report_big_o ? GetBigO(result.complexity) : "";
ColorPrintf(COLOR_YELLOW, "%10.4f %s %10.4f %s ", ColorPrintf(COLOR_YELLOW, "%10.4f %s %10.4f %s ",
......
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