catchunks: switch to RttEstimatorWithStats

Refs: #4887
Change-Id: I8d49eff6ff4a7dc9ff49ffacc0744e50695128d2
diff --git a/tools/chunks/catchunks/statistics-collector.cpp b/tools/chunks/catchunks/statistics-collector.cpp
index 2a65025..91af79d 100644
--- a/tools/chunks/catchunks/statistics-collector.cpp
+++ b/tools/chunks/catchunks/statistics-collector.cpp
@@ -28,25 +28,24 @@
 namespace chunks {
 
 StatisticsCollector::StatisticsCollector(PipelineInterestsAdaptive& pipeline,
-                                         RttEstimator& rttEstimator,
                                          std::ostream& osCwnd, std::ostream& osRtt)
   : m_osCwnd(osCwnd)
   , m_osRtt(osRtt)
 {
   m_osCwnd << "time\tcwndsize\n";
   m_osRtt  << "segment\trtt\trttvar\tsrtt\trto\n";
-  pipeline.afterCwndChange.connect(
-    [this] (time::nanoseconds timeElapsed, double cwnd) {
-      m_osCwnd << timeElapsed.count() / 1e9 << '\t' << cwnd << '\n';
-    });
-  rttEstimator.afterMeasurement.connect(
-    [this] (const RttEstimator::Sample& sample) {
-      m_osRtt << *sample.segNum << '\t'
-              << sample.rtt.count() / 1e6 << '\t'
-              << sample.rttVar.count() / 1e6 << '\t'
-              << sample.sRtt.count() / 1e6 << '\t'
-              << sample.rto.count() / 1e6 << '\n';
-    });
+
+  pipeline.afterCwndChange.connect([this] (time::nanoseconds timeElapsed, double cwnd) {
+    m_osCwnd << timeElapsed.count() / 1e9 << '\t' << cwnd << '\n';
+  });
+
+  pipeline.afterRttMeasurement.connect([this] (const auto& sample) {
+    m_osRtt << sample.segNum << '\t'
+            << sample.rtt.count() / 1e6 << '\t'
+            << sample.rttVar.count() / 1e6 << '\t'
+            << sample.sRtt.count() / 1e6 << '\t'
+            << sample.rto.count() / 1e6 << '\n';
+  });
 }
 
 } // namespace chunks