Documentation
¶
Index ¶
Constants ¶
View Source
const ( // SubtestDownload is a download subtest DirectionDownload = TestDirection("download") // SubtestUpload is a upload subtest DirectionUpload = TestDirection("upload") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByteCounters ¶ added in v0.3.2
type Measurement ¶
type Measurement struct {
// Application contains the application-level BytesSent/Received pair.
Application ByteCounters
// Network contains the network-level BytesSent/Received pair.
Network ByteCounters
// ElapsedTime is the time elapsed since the start of the measurement
// according to the party sending this Measurement.
ElapsedTime int64 `json:",omitempty"`
// BBRInfo is an optional struct containing BBR metrics. Only applicable
// when the congestion control algorithm used by the party sending this
// Measurement is BBR.
BBRInfo *inetdiag.BBRInfo `json:",omitempty"`
// TCPInfo is an optional struct containing some of the TCP_INFO kernel
// metrics for this TCP stream. Only applicable when the party sending this
// Measurement has access to it.
TCPInfo *TCPInfo `json:",omitempty"`
}
The Measurement struct contains measurement results. This structure is meant to be serialised as JSON and sent as a textual message.
type TCPInfo ¶
type TCPInfo struct {
tcp.LinuxTCPInfo
ElapsedTime int64
}
TCPInfo is an extension to Linux's TCPInfo struct that includes the time elapsed since the connection was accepted.
type Throughput1Result ¶
type Throughput1Result struct {
// GitShortCommit is the Git commit (short form) of the running server code.
GitShortCommit string
// Version is the symbolic version (if any) of the running server code.
Version string
// Direction is the test direction (download or upload).
Direction string
// MeasurementID is the unique identifier for multiple TCP streams belonging
// to the same measurement.
MeasurementID string
// UUID is the unique identifier for this TCP stream.
UUID string
// Server is the server's TCP endpoint (ip:port).
Server string
// Client is the client's TCP endpoint (ip:port).
Client string
// CCAlgorithm is the Congestion control algorithm used by the sender in
// this stream.
CCAlgorithm string
// StartTime is the time when the stream started. It does not include the
// connection setup time.
StartTime time.Time
// EndTime is the time when the stream ended.
EndTime time.Time
// ServerMeasurements is a list of measurements taken by the server.
ServerMeasurements []Measurement
// ClientMeasurements is a list of measurements taken by the client.
ClientMeasurements []Measurement
// ClientOptions is a name/value pair containing the standard querystring
// parameters sent by the client and recognized by the server as options.
ClientOptions []NameValue
// ClientMetadata is a name/value pair containing every non-standard
// querystring parameter sent by the client.
ClientMetadata []NameValue
}
Throughput1Result is the struct that is serialized as JSON to disk as the archival record of an throughput1 test.
type WireMeasurement ¶
type WireMeasurement struct {
// CC is the congestion control used by the sender of this WireMeasurement.
CC string `json:",omitempty"`
// UUID is the unique identifier for this TCP stream.
UUID string `json:",omitempty"`
// LocalAddr is the local TCP endpoint (ip:port).
LocalAddr string `json:",omitempty"`
// RemoteAddr is the server's TCP endpoint (ip:port).
RemoteAddr string `json:",omitempty"`
// Measurement is the Measurement struct wrapped by this WireMeasurement.
Measurement
}
WireMeasurement is a wrapper for Measurement structs that contains information about this TCP stream that does not need to be sent every time. Every field except for Measurement is only expected to be non-empty once.
Click to show internal directories.
Click to hide internal directories.