Console reporting of user counters: print rates like non-rates.

This commit is contained in:
Joao Paulo Magalhaes 2017-04-29 19:34:37 +01:00
parent 5ed1b1dea7
commit 921a51abcf
1 changed files with 2 additions and 2 deletions

View File

@ -134,8 +134,8 @@ void ConsoleReporter::PrintRunData(const Run& result) {
for (auto& c : result.counters) { for (auto& c : result.counters) {
auto const& s = HumanReadableNumber(c.second.value); auto const& s = HumanReadableNumber(c.second.value);
if (c.second.flags & Counter::Flags::kIsRate) { if (c.second.flags & Counter::Flags::kIsRate) {
std::string counter_rate = StrCat(" ", HumanReadableNumber(c.second.value), " ", c.first.c_str(), "/s"); std::string counter_rate = StrCat(HumanReadableNumber(c.second.value), "/s");
printer(Out, COLOR_DEFAULT, " %*s", 13, counter_rate.c_str()); printer(Out, COLOR_DEFAULT, " %s=%s", c.first.c_str(), counter_rate.c_str());
} }
else { else {
printer(Out, COLOR_DEFAULT, " %s=%s", c.first.c_str(), s.c_str()); printer(Out, COLOR_DEFAULT, " %s=%s", c.first.c_str(), s.c_str());