Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Stats ¶
type Stats struct {
// Latencies is a map latency per nanosecond.
Latencies map[int64]time.Duration
// Bandwidths is a map of bandwidth per nanosecond.
Bandwidths map[int64]float64
// TotalSent is the total number of packets sent.
TotalSent int
// TotalReceived is the total number of packets received.
TotalReceived int
}
Stats contains the statistics of a transfer.
func (*Stats) Bandwidth ¶
Bandwidth returns the bandwidth in bytes per second. The serie is IQR filtered, and mean is calculated.
func (*Stats) Latency ¶
Latency returns the average latency. The serie is IQR filtered, and mean is calculated.
func (*Stats) PacketLoss ¶
PacketLoss returns the percentage of packets lost.
Click to show internal directories.
Click to hide internal directories.