27 #ifndef NDN_CXX_UTIL_RTT_ESTIMATOR_HPP 28 #define NDN_CXX_UTIL_RTT_ESTIMATOR_HPP 60 RttEstimator(shared_ptr<const Options> options =
nullptr);
71 addMeasurement(time::nanoseconds rtt,
size_t nExpectedSamples = 1);
76 return m_sRtt != -1_ns;
118 time::nanoseconds m_sRtt{-1};
119 time::nanoseconds m_rttVar{-1};
120 time::nanoseconds m_rto;
147 addMeasurement(time::nanoseconds rtt,
size_t nExpectedSamples = 1);
177 time::nanoseconds m_rttMin = time::nanoseconds::max();
178 time::nanoseconds m_rttMax = time::nanoseconds::min();
179 time::nanoseconds m_rttAvg = 0_ns;
180 int64_t m_nRttSamples = 0;
186 #endif // NDN_CXX_UTIL_RTT_ESTIMATOR_HPP
time::nanoseconds getEstimatedRto() const
Returns the estimated RTO value.
shared_ptr< const Options > m_options
time::nanoseconds initialRto
initial RTO value
time::nanoseconds maxRto
upper bound of RTO
void addMeasurement(time::nanoseconds rtt, size_t nExpectedSamples=1)
Records a new RTT measurement.
time::nanoseconds getMinRtt() const
Returns the minimum RTT observed.
void backoffRto()
Backoff RTO by a factor of Options::rtoBackoffMultiplier.
double alpha
weight of exponential moving average for smoothed RTT
RTT/RTO estimator that also maintains min/max/average RTT statistics.
time::nanoseconds minRto
lower bound of RTO
RttEstimator(shared_ptr< const Options > options=nullptr)
Constructor.
int k
RTT variation multiplier used when calculating RTO.
time::nanoseconds getAvgRtt() const
Returns the average RTT.
double beta
weight of exponential moving average for RTT variation
time::nanoseconds getSmoothedRtt() const
Returns the smoothed RTT value (SRTT).
time::nanoseconds getMaxRtt() const
Returns the maximum RTT observed.
time::nanoseconds getRttVariation() const
Returns the RTT variation (RTTVAR).
int rtoBackoffMultiplier
RTO multiplier used in backoff operation.