Documentation
¶
Overview ¶
Package ndt7 contains a non-backwards compatible redesign of the NDT network performance measurement protocol. The complete specification of the protocol is available at https://github.com/m-lab/ndt-cloud/blob/master/spec/ndt7.md.
Index ¶
Constants ¶
const DownloadURLPath = "/ndt/v7/download"
DownloadURLPath selects the download subtest.
const MinMaxMessageSize = 1 << 17
MinMaxMessageSize is the minimum value of the maximum message size that an implementation MAY want to configure. Messages smaller than this threshold MUST always be accepted by an implementation.
const MinMeasurementInterval = 250 * time.Millisecond
MinMeasurementInterval is the minimum value of the interval betwen two consecutive measurements performed by either party. An implementation MAY choose to close the connection if it is receiving too frequent Measurement messages from the other endpoint.
const SecWebSocketProtocol = "net.measurementlab.ndt.v7"
SecWebSocketProtocol is the WebSocket subprotocol used by ndt7.
const UploadURLPath = "/ndt/v7/upload"
UploadURLPath selects the upload subtest.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BBRInfo ¶
type BBRInfo struct { // Bandwidth is the bandwidth measured by BBR in bits per second. Bandwidth float64 `json:"bandwidth"` // RTT is the RTT measured by BBR in milliseconds. RTT float64 `json:"rtt"` }
The BBRInfo struct contains information measured using BBR.
type DownloadHandler ¶
DownloadHandler handles a download subtest from the server side.
func (DownloadHandler) ServeHTTP ¶
func (dl DownloadHandler) ServeHTTP(writer http.ResponseWriter, request *http.Request)
Handle handles the download subtest.
type Measurement ¶
type Measurement struct { // Elapsed is the number of seconds elapsed since the beginning. Elapsed float64 `json:"elapsed"` // NumBytes is the number of bytes transferred since the beginning. NumBytes float64 `json:"num_bytes"` // BBRInfo is the data measured using TCP BBR instrumentation. BBRInfo *BBRInfo `json:"bbr_info,omitempty"` }
The Measurement struct contains measurement results. This structure is meant to be serialised as JSON as sent on a textual message.