Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SlidingWindowHistogram ¶
type SlidingWindowHistogram struct {
// contains filtered or unexported fields
}
SlidingWindowHistogram maintains a histogram over a sliding window of data.
func NewSlidingWindowHistogram ¶
func NewSlidingWindowHistogram(size int) *SlidingWindowHistogram
NewSlidingWindowHistogram creates a new SlidingWindowHistogram with a given size.
func (*SlidingWindowHistogram) Add ¶
func (h *SlidingWindowHistogram) Add(value float64)
Add adds a new value to the histogram, sliding the window if necessary.
func (*SlidingWindowHistogram) Mean ¶
func (h *SlidingWindowHistogram) Mean() float64
Mean calculates the mean of the data in the window.
func (*SlidingWindowHistogram) Min ¶
func (h *SlidingWindowHistogram) Min() float64
Min calculates the minimum value of the data in the window.
func (*SlidingWindowHistogram) StdDev ¶
func (h *SlidingWindowHistogram) StdDev() float64
StdDev calculates the standard deviation of the data in the window.
type TCPStats ¶
type TCPStats struct { SRTT float64 // Smoothed RTT RTTVAR float64 // RTT variance RTO float64 // Retransmission timeout K float64 // Factor to multiply with RTTVAR // contains filtered or unexported fields }
TCPStats holds TCP RTT related statistics.
func NewTCPStats ¶
func NewTCPStats(initialRTO float64, minRTTVAR float64, alpha float64, beta float64, minRTO float64, maxRTO float64, K float64, histSize int) TCPStats
NewTCPStats initializes the TCPStats with the first RTT measurement.
func (*TCPStats) GetBaseRTT ¶
GetBaseRTT returns the base RTT.
func (*TCPStats) UpdateHistory ¶
func (t *TCPStats) UpdateHistory()
Click to show internal directories.
Click to hide internal directories.