changed color and remove iterations

This commit is contained in:
Ismael 2016-05-23 22:09:55 +02:00
parent 43ef17441c
commit 266b3bd635
3 changed files with 25 additions and 11 deletions

View File

@ -112,7 +112,7 @@ void ConsoleReporter::PrintRunData(const Run& result) {
const char* timeLabel;
std::tie(timeLabel, multiplier) = GetTimeUnitAndMultiplier(result.time_unit);
ColorPrintf(COLOR_GREEN, "%-*s ",
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) {
@ -146,6 +146,7 @@ void ConsoleReporter::PrintRunData(const Run& result) {
timeLabel);
}
if(!result.report_big_o && !result.report_rms)
ColorPrintf(COLOR_CYAN, "%10lld", result.iterations);
if (!rate.empty()) {

View File

@ -99,10 +99,20 @@ void CSVReporter::PrintRunData(const Run & run) {
ReplaceAll(&name, "\"", "\"\"");
std::cout << "\"" << name << "\",";
// Do not print iteration on bigO and RMS report
if(!run.report_big_o && !run.report_rms)
std::cout << run.iterations << ",";
else
std::cout << ",";
std::cout << real_time << ",";
std::cout << cpu_time << ",";
// Do not print timeLabel on RMS report
if(!run.report_rms)
std::cout << timeLabel << ",";
else
std::cout << ",";
if (run.bytes_per_second > 0.0) {
std::cout << run.bytes_per_second;

View File

@ -162,17 +162,20 @@ void JSONReporter::PrintRunData(Run const& run) {
out << indent
<< FormatKV("name", run.benchmark_name)
<< ",\n";
if(!run.report_big_o && !run.report_rms) {
out << indent
<< FormatKV("iterations", run.iterations)
<< ",\n";
}
out << indent
<< FormatKV("real_time", RoundDouble(real_time))
<< ",\n";
out << indent
<< FormatKV("cpu_time", RoundDouble(cpu_time))
<< ",\n";
out << indent
<< FormatKV("cpu_time", RoundDouble(cpu_time));
if(!run.report_rms) {
out << ",\n" << indent
<< FormatKV("time_unit", timeLabel);
}
if (run.bytes_per_second > 0.0) {
out << ",\n" << indent
<< FormatKV("bytes_per_second", RoundDouble(run.bytes_per_second));