Documentation ¶
Overview ¶
Package rttest implements an RTT estimator.
Index ¶
- Constants
- type RttEstimator
- func (rtte *RttEstimator) Assign(sRtt, rttVar time.Duration)
- func (rtte *RttEstimator) Backoff()
- func (rtte *RttEstimator) Push(rtt time.Duration, nPendings int)
- func (rtte RttEstimator) RTO() time.Duration
- func (rtte RttEstimator) RTTVAR() time.Duration
- func (rtte RttEstimator) SRTT() time.Duration
Constants ¶
View Source
const ( K = 4 AlphaDividend = 1 AlphaDivisor = 8 BetaDividend = 1 BetaDivisor = 4 InitRto = 1000 MinRto = 200 MaxRto = 60000 Alpha = 1.0 * AlphaDividend / AlphaDivisor Beta = 1.0 * BetaDividend / BetaDivisor InitRtoSeconds = InitRto / 1000.0 MinRtoSeconds = MinRto / 1000.0 MaxRtoSeconds = MaxRto / 1000.0 )
RTT algorithm constants.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RttEstimator ¶
type RttEstimator struct {
// contains filtered or unexported fields
}
RttEstimator is an RTT estimator.
func (*RttEstimator) Assign ¶
func (rtte *RttEstimator) Assign(sRtt, rttVar time.Duration)
Assign sets SRTT and RTTVAR values.
func (*RttEstimator) Backoff ¶
func (rtte *RttEstimator) Backoff()
Backoff performs exponential backoff.
func (*RttEstimator) Push ¶
func (rtte *RttEstimator) Push(rtt time.Duration, nPendings int)
Push adds a measurement.
func (RttEstimator) RTO ¶
func (rtte RttEstimator) RTO() time.Duration
RTO returns retransmission timer.
func (RttEstimator) RTTVAR ¶
func (rtte RttEstimator) RTTVAR() time.Duration
RTTVAR returns round-trip time variance.
func (RttEstimator) SRTT ¶
func (rtte RttEstimator) SRTT() time.Duration
SRTT returns smoothed round-trip time.
Click to show internal directories.
Click to hide internal directories.