Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputePerfStats ¶
func ComputePerfStats(latencies, throughputs []float64) (Latency, Throughput, error)
ComputePerfStats takes arrays of Latency & Throughput to compute Statistics
func IsNetworkOrHostDown ¶
IsNetworkOrHostDown - if there was a network error or if the host is down. expectTimeouts indicates that *context* timeouts are expected and does not indicate a downed host. Other timeouts still returns down.
Types ¶
type Host ¶
Host - holds network host IP/name and its port.
func (Host) MarshalJSON ¶
MarshalJSON - converts Host into JSON data
func (*Host) UnmarshalJSON ¶
UnmarshalJSON - parses data into Host.
type Latency ¶
type Latency struct { Avg float64 `json:"avg_secs,omitempty"` Percentile50 float64 `json:"percentile50_secs,omitempty"` Percentile90 float64 `json:"percentile90_secs,omitempty"` Percentile99 float64 `json:"percentile99_secs,omitempty"` Min float64 `json:"min_secs,omitempty"` Max float64 `json:"max_secs,omitempty"` }
Latency holds latency information for read/write operations to the drive
type Throughput ¶
type Throughput struct { Avg float64 `json:"avg_bytes_per_sec,omitempty"` Percentile50 float64 `json:"percentile50_bytes_per_sec,omitempty"` Percentile90 float64 `json:"percentile90_bytes_per_sec,omitempty"` Percentile99 float64 `json:"percentile99_bytes_per_sec,omitempty"` Min float64 `json:"min_bytes_per_sec,omitempty"` Max float64 `json:"max_bytes_per_sec,omitempty"` }
Throughput holds throughput information for read/write operations to the drive
type URL ¶
URL - improved JSON friendly url.URL.
func ParseHTTPURL ¶
ParseHTTPURL - parses a string into HTTP URL, string is expected to be of form http:// or https://
func (URL) MarshalJSON ¶
MarshalJSON - converts to JSON string data.
func (*URL) UnmarshalJSON ¶
UnmarshalJSON - parses given data into URL.