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); });
   }
 
diff --git a/tools/ping/client/statistics-collector.cpp b/tools/ping/client/statistics-collector.cpp
index cc8842c..dcb8ae9 100644
--- a/tools/ping/client/statistics-collector.cpp
+++ b/tools/ping/client/statistics-collector.cpp
@@ -100,7 +100,7 @@
   return statistics;
 }
 
-std::ostream&
+void
 Statistics::printSummary(std::ostream& os) const
 {
   os << nReceived << "/" << nSent << " packets";
@@ -110,39 +110,33 @@
   }
 
   if (nReceived > 0) {
-    os << ", min/avg/max/mdev = " << minRtt << "/" << avgRtt << "/" << maxRtt << "/" << stdDevRtt
-       << " ms";
+    os << ", min/avg/max/mdev = " << minRtt << "/" << avgRtt << "/" << maxRtt
+       << "/" << stdDevRtt << " ms";
   }
 
-  return os << "\n";
+  os << "\n";
 }
 
-std::ostream&
-operator<<(std::ostream& os, const Statistics& statistics)
+void
+Statistics::printFull(std::ostream& os) const
 {
+  os << "\n--- " << prefix << " ping statistics ---\n"
+     << nSent << " packets transmitted"
+     << ", " << nReceived << " received"
+     << ", " << nNacked << " nacked";
+
+  if (nSent > 0) {
+    os << ", " << packetLossRate * 100.0 << "% lost, " << packetNackedRate * 100.0 << "% nacked";
+  }
+
+  os << ", time " << sumRtt << " ms";
+
+  if (nReceived > 0) {
+    os << "\nrtt min/avg/max/mdev = " << minRtt << "/" << avgRtt << "/" << maxRtt
+       << "/" << stdDevRtt << " ms";
+  }
+
   os << "\n";
-  os << "--- " << statistics.prefix << " ping statistics ---\n";
-  os << statistics.nSent << " packets transmitted";
-  os << ", " << statistics.nReceived << " received";
-  os << ", " << statistics.nNacked << " nacked";
-
-  if (statistics.nSent > 0) {
-    os << ", " << statistics.packetLossRate * 100.0 << "% lost";
-    os << ", " << statistics.packetNackedRate * 100.0 << "% nacked";
-  }
-
-  os << ", time " << statistics.sumRtt << " ms";
-
-  if (statistics.nReceived > 0) {
-    os << "\n";
-    os << "rtt min/avg/max/mdev = ";
-    os << statistics.minRtt << "/";
-    os << statistics.avgRtt << "/";
-    os << statistics.maxRtt << "/";
-    os << statistics.stdDevRtt << " ms";
-  }
-
-  return os;
 }
 
 } // namespace ndn::ping::client
diff --git a/tools/ping/client/statistics-collector.hpp b/tools/ping/client/statistics-collector.hpp
index e335aae..10e1d58 100644
--- a/tools/ping/client/statistics-collector.hpp
+++ b/tools/ping/client/statistics-collector.hpp
@@ -31,11 +31,16 @@
 
 namespace ndn::ping::client {
 
-/**
- * @brief statistics data
- */
-struct Statistics
+class Statistics
 {
+public:
+  void
+  printSummary(std::ostream& os) const;
+
+  void
+  printFull(std::ostream& os) const;
+
+public:
   Name prefix;                                  //!< prefix pinged
   int nSent;                                    //!< number of pings sent
   int nReceived;                                //!< number of pings received
@@ -48,16 +53,10 @@
   double sumRtt;                                //!< sum of round trip times
   double avgRtt;                                //!< average round trip time
   double stdDevRtt;                             //!< std dev of round trip time
-
-  std::ostream&
-  printSummary(std::ostream& os) const;
-
-  friend std::ostream&
-  operator<<(std::ostream& os, const Statistics& statistics);
 };
 
 /**
- * @brief Statistics collector from ping client
+ * @brief Statistics collector from ping client.
  */
 class StatisticsCollector : noncopyable
 {
