Documentation
¶
Index ¶
Constants ¶
const ( MeasureNotValid = Measure(invalid) MeasureNotInitialized = Measure(invalid - 1) )
Some variables for invalid measures. Naming should be explicit enough
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Measure ¶
Measure represent a time measurement which can be successful or not
func (Measure) Divide ¶
Divide returns the result of the division of a measure with n if the measure is invalid the returned value is invalid as well
func (Measure) IsValid ¶
IsValid returns true if the measurement is valid (might be negative (!), but is the difference between two time measurements
func (Measure) SumIfValid ¶
SumIfValid returns - if both measures are valid: the sum of them - if one of them is invalid, it returns this specific one - otherwise it returns an invalid measure
type PingStats ¶
PingStats represents the statistics which can be computed from an array of latencies
func PingStatsFromLatencies ¶
PingStatsFromLatencies computes PingStats from a serie of ping measurements.