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... | |
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.
using ndn::util::RttEstimator::MillisecondsDouble = time::duration<double, time::milliseconds::period> |
Definition at line 44 of file rtt-estimator.hpp.
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.
void ndn::util::RttEstimator::addMeasurement | ( | MillisecondsDouble | rtt, |
size_t | nExpectedSamples | ||
) |
Add a new RTT measurement to the estimator.
rtt | the sampled rtt |
nExpectedSamples | number 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. |
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.
|
inline |
Returns the average RTT.
Definition at line 117 of file rtt-estimator.hpp.
|
inline |
Returns the estimated RTO value.
Definition at line 90 of file rtt-estimator.hpp.
|
inline |
Returns the maximum RTT observed.
Definition at line 108 of file rtt-estimator.hpp.
|
inline |
Returns the minimum RTT observed.
Definition at line 99 of file rtt-estimator.hpp.