Documentation
¶
Index ¶
- type Measurement
- func (m *Measurement) AvgLatency() float64
- func (m *Measurement) DialTCP() *TCPResponse
- func (m *Measurement) IsFinished() bool
- func (m *Measurement) MaxLatency() float64
- func (m *Measurement) MinLatency() float64
- func (m *Measurement) Result() MeasurementResult
- func (m *Measurement) StdDevLatency() float64
- type MeasurementResult
- type TCPResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Measurement ¶
type Measurement struct {
Host string
Port int
Timeout int
Runs int
Wait int
// contains filtered or unexported fields
}
Measurements represents a new tcplatency measurement
func NewMeasurement ¶
func (*Measurement) AvgLatency ¶
func (m *Measurement) AvgLatency() float64
AvgLatency returns the average tcp latency
func (*Measurement) DialTCP ¶
func (m *Measurement) DialTCP() *TCPResponse
DialTCP calculates a latency point using sockets.
func (*Measurement) IsFinished ¶
func (m *Measurement) IsFinished() bool
IsFinished returns true when all tcp ping runs have been executed, false if not
func (*Measurement) MaxLatency ¶
func (m *Measurement) MaxLatency() float64
MaxLatency returns the max latency
func (*Measurement) MinLatency ¶
func (m *Measurement) MinLatency() float64
MinLatency returns the min latency
func (*Measurement) Result ¶
func (m *Measurement) Result() MeasurementResult
Result returns a new measurement result. Can be used to summarize results of multiple measurements
func (*Measurement) StdDevLatency ¶
func (m *Measurement) StdDevLatency() float64
StdDevLatency calculates an average of how far each latency is from the mean latency. The higher MedianDerivation is, the more variable the latency is over time.
Click to show internal directories.
Click to hide internal directories.