ping: use a member function rather than `operator<<` for stats
Change-Id: I8e2d469d80d9b5d5e82d14e9f3039a464a7eeae5
diff --git a/tools/ping/client/main.cpp b/tools/ping/client/main.cpp
index d29549b..2e5e337 100644
--- a/tools/ping/client/main.cpp
+++ b/tools/ping/client/main.cpp
@@ -64,8 +64,8 @@
return 2;
}
- Statistics statistics = m_statisticsCollector.computeStatistics();
- std::cout << statistics << "\n";
+ auto statistics = m_statisticsCollector.computeStatistics();
+ statistics.printFull(std::cout);
if (statistics.nReceived == statistics.nSent) {
return 0;
@@ -102,6 +102,7 @@
}
m_statisticsCollector.computeStatistics().printSummary(std::cout);
+
m_signalSetQuit.async_wait([this] (const auto& err, int) { onQuitSignal(err); });
}