model

package
v0.13.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2019 License: Apache-2.0 Imports: 3 Imported by: 7

Documentation

Overview

Package model contains the ndt7 data model

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppInfo

type AppInfo struct {
	// NumBytes is the number of bytes transferred so far.
	NumBytes int64 `json:"num_bytes"`
}

AppInfo contains an application level measurement.

type ArchivalData added in v0.10.0

type ArchivalData struct {
	UUID               string
	StartTime          time.Time
	EndTime            time.Time
	ServerMeasurements []Measurement
	ClientMeasurements []Measurement
	ClientMetadata     []metadata.NameValue `json:",omitempty"`
}

ArchivalData saves all instantaneous measurements over the lifetime of a test.

type BBRInfo

type BBRInfo struct {
	// MaxBandwidth is the max bandwidth measured by BBR in bits per second.
	MaxBandwidth int64 `json:"max_bandwidth"`

	// MinRTT is the min RTT measured by BBR in milliseconds.
	MinRTT float64 `json:"min_rtt"`
}

The BBRInfo struct contains information measured using BBR.

type ConnectionInfo added in v0.9.0

type ConnectionInfo struct {
	// Client is the client endpoint
	Client string `json:"client"`

	// Server is the server endpoint
	Server string `json:"server"`

	// UUID is the internal unique identifier of this experiment.
	UUID string `json:"uuid"`
}

ConnectionInfo contains connection info.

type Measurement

type Measurement struct {
	// AppInfo contains application level measurements.
	AppInfo *AppInfo `json:"app_info,omitempty"`

	// ConnectionInfo contains connection information.
	ConnectionInfo *ConnectionInfo `json:"connection_info,omitempty" bigquery:"-"`

	// BBRInfo is the data measured using TCP BBR instrumentation.
	BBRInfo *BBRInfo `json:"bbr_info,omitempty"`

	// Elapsed is the number of seconds elapsed since the beginning.
	Elapsed float64 `json:"elapsed"`

	// TCPInfo contains metrics measured using TCP_INFO instrumentation.
	TCPInfo *TCPInfo `json:"tcp_info,omitempty"`
}

The Measurement struct contains measurement results. This structure is meant to be serialised as JSON as sent as a textual message.

type TCPInfo

type TCPInfo struct {
	// SmoothedRTT is the smoothed RTT in milliseconds.
	SmoothedRTT float64 `json:"smoothed_rtt"`

	// RTTVar is the RTT variance in milliseconds.
	RTTVar float64 `json:"rtt_var"`
}

The TCPInfo struct contains information measured using TCP_INFO.

func NewTCPInfo added in v0.13.0

func NewTCPInfo(kernelTCPInfo *tcp.LinuxTCPInfo) *TCPInfo

NewTCPInfo creates an ndt7 model from the TCPInfo struct returned from the kernel.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL