Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Location = "iperf3"
Functions ¶
This section is empty.
Types ¶
type CPU ¶
type CPU struct { HostTotal float64 `json:"host_total"` HostUser float64 `json:"host_user"` HostSystem float64 `json:"host_system"` RemoteTotal float64 `json:"remote_total"` RemoteUser float64 `json:"remote_user"` RemoteSystem float64 `json:"remote_system"` }
CPU contains data about the server/client CPU usage
func (*CPU) IsOverLoaded ¶
IsOverLoaded returns true if the server or the host had too high CPU usage during the tests
type FinalResult ¶
type FinalResult struct { Streams *[]Measure `json:"streams"` Sent *Summary `json:"sum_sent"` Received *Summary `json:"sum_received"` CPU *CPU `json:"cpu_utilization_percent"` SenderTCPCongestion string `json:"sender_tcp_congestion"` ReceiverTCPCongestion string `json:"receiver_tcp_congestion"` }
FinalResult contains all the necessary infos of the test
type Initial ¶
type Initial struct { Connected []map[string]interface{} `json:"connected"` Version string `json:"version"` SystemInfo string `json:"system_info"` TimeStamp *TimeStamp `json:"timestamp"` Server *Server `json:"connecting_to"` Cookie string `json:"cookie"` TCPMSegmentSize int `json:"tcp_mss_default"` SocketBufferSize int `json:"sock_bufsize"` SenderBufferCurrent int `json:"sndbuf_actual"` ReceiverBufferCurrent int `json:"rcvbuf_actual"` Test *Test `json:"test_start"` }
Initial contains data about the IPerf3 initialization
type Result ¶
type Result struct { Initial *Initial `json:"start"` Measures *[]Measure `json:"intervals"` Result *FinalResult `json:"end"` Error string `json:"error"` }
Result contains the result of the IPerf3 test
func (*Result) IsBusy ¶
IsBusy is a shortcut for error handling, it returns true if the server is busy
func (*Result) IsDown ¶
IsDown is a shortcut for error handling, it returns true if the server is down or unreachable Intended for long outages that can't autorecover in a small timespan
func (*Result) IsTemporarilyDown ¶
IsTemporarilyDown is a shortcut for error handling, it returns true if the server didn't reply to the control message Intended for short outages that could be fixed in a few seconds of with another try
type Stream ¶
type Stream struct { Socket int `json:"socket"` Start float64 `json:"start"` End float64 `json:"end"` Seconds float64 `json:"seconds"` BitsPerSecond float64 `json:"bits_per_second"` Retransmits int `json:"retransmits"` SenderCWND int `json:"snd_cwnd"` RTT int `json:"rtt"` RTTVar int `json:"rttvar"` PMTU int `json:"pmtu"` Omitted bool `json:"omitted"` }
Stream contains data about the streams used in the test
type Summary ¶
type Summary struct { Start float64 `json:"start"` End float64 `json:"end"` Seconds float64 `json:"seconds"` Bytes int `json:"bytes"` BitsPerSecond float64 `json:"bits_per_second"` Retransmits int `json:"retransmits"` Omitted bool `json:"omitted"` }
Summary contains a recap of the whole test
func (*Summary) GetMegabits ¶
GetMegabits returns the result speed in Megabits instead of bits
type Test ¶
type Test struct { Protocol string `json:"protocol"` StreamsNumber int `json:"num_streams"` BlockSize int `json:"blksize"` Omit int `json:"omit"` Duration int `json:"duration"` Bytes int `json:"bytes"` Blocks int `json:"blocks"` Reverse int `json:"reverse"` ToS int `json:"tos"` }
Test contains data about the IPerf3 test