ndn::util::RttEstimator Class Reference

RTT Estimator. More...

#include <ndn-cxx/util/rtt-estimator.hpp>

Classes

class  Options
 

Public Types

using MillisecondsDouble = time::duration< double, time::milliseconds::period >
 

Public Member Functions

 RttEstimator (const Options &options=Options())
 Create a RTT Estimator. More...
 
void addMeasurement (MillisecondsDouble rtt, size_t nExpectedSamples)
 Add a new RTT measurement to the estimator. More...
 
void backoffRto ()
 Backoff RTO by a factor of Options::rtoBackoffMultiplier. More...
 
MillisecondsDouble getAvgRtt () const
 Returns the average RTT. More...
 
MillisecondsDouble getEstimatedRto () const
 Returns the estimated RTO value. More...
 
MillisecondsDouble getMaxRtt () const
 Returns the maximum RTT observed. More...
 
MillisecondsDouble getMinRtt () const
 Returns the minimum RTT observed. More...
 

Detailed Description

RTT Estimator.

This class implements the "Mean-Deviation" RTT estimator, as discussed in RFC 6298, with the modifications to RTO calculation described in RFC 7323 Appendix G.

Definition at line 41 of file rtt-estimator.hpp.

Member Typedef Documentation

using ndn::util::RttEstimator::MillisecondsDouble = time::duration<double, time::milliseconds::period>

Definition at line 44 of file rtt-estimator.hpp.

Constructor & Destructor Documentation

ndn::util::RttEstimator::RttEstimator ( const Options options = Options())
explicit

Create a RTT Estimator.

Configures the RTT Estimator with the default parameters if an instance of Options is not passed to the constructor.

Definition at line 34 of file rtt-estimator.cpp.

Member Function Documentation

void ndn::util::RttEstimator::addMeasurement ( MillisecondsDouble  rtt,
size_t  nExpectedSamples 
)

Add a new RTT measurement to the estimator.

Parameters
rttthe sampled rtt
nExpectedSamplesnumber of expected samples, must be greater than 0. It should be set to current number of in-flight Interests. Please refer to Appendix G of RFC 7323 for details.
Note
Don't add RTT measurements for retransmissions

Definition at line 47 of file rtt-estimator.cpp.

void ndn::util::RttEstimator::backoffRto ( )

Backoff RTO by a factor of Options::rtoBackoffMultiplier.

Definition at line 73 of file rtt-estimator.cpp.

MillisecondsDouble ndn::util::RttEstimator::getAvgRtt ( ) const
inline

Returns the average RTT.

Definition at line 117 of file rtt-estimator.hpp.

MillisecondsDouble ndn::util::RttEstimator::getEstimatedRto ( ) const
inline

Returns the estimated RTO value.

Definition at line 90 of file rtt-estimator.hpp.

MillisecondsDouble ndn::util::RttEstimator::getMaxRtt ( ) const
inline

Returns the maximum RTT observed.

Definition at line 108 of file rtt-estimator.hpp.

MillisecondsDouble ndn::util::RttEstimator::getMinRtt ( ) const
inline

Returns the minimum RTT observed.

Definition at line 99 of file rtt-estimator.hpp.