aboutsummaryrefslogtreecommitdiff
path: root/src/console_reporter.cc
diff options
context:
space:
mode:
authorJoao Paulo Magalhaes <dev@jpmag.me>2017-04-29 19:27:53 +0100
committerJoao Paulo Magalhaes <dev@jpmag.me>2017-04-29 19:27:53 +0100
commit5ed1b1dea7532c0bd08850bea3cf6591d4b7f167 (patch)
treebabc723bbad80e5afedf04e5fa26a43a436c0c3c /src/console_reporter.cc
parent78548f8c6edf1c2a537c6482badfda1505eda5e3 (diff)
parent1295ce8f23717d910caf602ee4458212e9a3e746 (diff)
downloadgoogle-benchmark-5ed1b1dea7532c0bd08850bea3cf6591d4b7f167.tar.gz
Merge branch 'master' of https://github.com/vladoovtcharov/benchmark into test_usercounters
Diffstat (limited to 'src/console_reporter.cc')
-rw-r--r--src/console_reporter.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/console_reporter.cc b/src/console_reporter.cc
index e1044cd..d4dbb8e 100644
--- a/src/console_reporter.cc
+++ b/src/console_reporter.cc
@@ -133,7 +133,13 @@ void ConsoleReporter::PrintRunData(const Run& result) {
for (auto& c : result.counters) {
auto const& s = HumanReadableNumber(c.second.value);
- printer(Out, COLOR_DEFAULT, " %s=%s", c.first.c_str(), s.c_str());
+ if (c.second.flags & Counter::Flags::kIsRate) {
+ std::string counter_rate = StrCat(" ", HumanReadableNumber(c.second.value), " ", c.first.c_str(), "/s");
+ printer(Out, COLOR_DEFAULT, " %*s", 13, counter_rate.c_str());
+ }
+ else {
+ printer(Out, COLOR_DEFAULT, " %s=%s", c.first.c_str(), s.c_str());
+ }
}
if (!rate.empty()) {