mirror of https://github.com/google/benchmark.git
clang-format
This commit is contained in:
parent
5fde8c053d
commit
f834669b34
|
@ -59,9 +59,9 @@ bool ConsoleReporter::ReportContext(const Context& context) {
|
||||||
|
|
||||||
BENCHMARK_EXPORT
|
BENCHMARK_EXPORT
|
||||||
void ConsoleReporter::PrintHeader(const Run& run) {
|
void ConsoleReporter::PrintHeader(const Run& run) {
|
||||||
std::string str = FormatString(
|
std::string str =
|
||||||
"%-*s %13s %15s %12s", static_cast<int>(name_field_width_),
|
FormatString("%-*s %13s %15s %12s", static_cast<int>(name_field_width_),
|
||||||
"Benchmark", "Time", "CPU", "Iterations");
|
"Benchmark", "Time", "CPU", "Iterations");
|
||||||
if (!run.counters.empty()) {
|
if (!run.counters.empty()) {
|
||||||
if (output_options_ & OO_Tabular) {
|
if (output_options_ & OO_Tabular) {
|
||||||
for (auto const& c : run.counters) {
|
for (auto const& c : run.counters) {
|
||||||
|
@ -157,17 +157,16 @@ void ConsoleReporter::PrintRunData(const Run& result) {
|
||||||
|
|
||||||
if (result.report_big_o) {
|
if (result.report_big_o) {
|
||||||
std::string big_o = GetBigOString(result.complexity);
|
std::string big_o = GetBigOString(result.complexity);
|
||||||
printer(Out, COLOR_YELLOW, "%10.2f %-4s %10.2f %-4s ",
|
printer(Out, COLOR_YELLOW, "%10.2f %-4s %10.2f %-4s ", real_time,
|
||||||
real_time, big_o.c_str(), cpu_time, big_o.c_str());
|
big_o.c_str(), cpu_time, big_o.c_str());
|
||||||
} else if (result.report_rms) {
|
} else if (result.report_rms) {
|
||||||
printer(Out, COLOR_YELLOW, "%10.0f %-4s %10.0f %-4s ",
|
printer(Out, COLOR_YELLOW, "%10.0f %-4s %10.0f %-4s ", real_time * 100, "%",
|
||||||
real_time * 100, "%", "%", cpu_time * 100, "%");
|
"%", cpu_time * 100, "%");
|
||||||
} else if (result.run_type != Run::RT_Aggregate ||
|
} else if (result.run_type != Run::RT_Aggregate ||
|
||||||
result.aggregate_unit == StatisticUnit::kTime) {
|
result.aggregate_unit == StatisticUnit::kTime) {
|
||||||
const char* timeLabel = GetTimeUnitString(result.time_unit);
|
const char* timeLabel = GetTimeUnitString(result.time_unit);
|
||||||
printer(Out, COLOR_YELLOW, "%s %-4s %s %-4s ",
|
printer(Out, COLOR_YELLOW, "%s %-4s %s %-4s ", real_time_str.c_str(),
|
||||||
real_time_str.c_str(), timeLabel,
|
timeLabel, cpu_time_str.c_str(), timeLabel);
|
||||||
cpu_time_str.c_str(), timeLabel);
|
|
||||||
} else {
|
} else {
|
||||||
assert(result.aggregate_unit == StatisticUnit::kPercentage);
|
assert(result.aggregate_unit == StatisticUnit::kPercentage);
|
||||||
printer(Out, COLOR_YELLOW, "%10.2f %-4s %10.2f %-4s ",
|
printer(Out, COLOR_YELLOW, "%10.2f %-4s %10.2f %-4s ",
|
||||||
|
|
Loading…
Reference in New Issue