iperf

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2026 License: Apache-2.0 Imports: 21 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package iperf is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTask

func NewTask() perf.Task

NewTask creates a new iperf test

Types

type CPUUtilizationPercent

type CPUUtilizationPercent 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"`
}

type Connected

type Connected struct {
	Socket     int64  `json:"socket"`
	LocalHost  string `json:"local_host"`
	LocalPort  int64  `json:"local_port"`
	RemoteHost string `json:"remote_host"`
	RemotePort int64  `json:"remote_port"`
}

type ConnectingTo

type ConnectingTo struct {
	Host string `json:"host"`
	Port int64  `json:"port"`
}

type End

type End struct {
	Streams               []EndStream           `json:"streams"`
	SumSent               Sum                   `json:"sum_sent"`
	SumReceived           Sum                   `json:"sum_received"`
	CPUUtilizationPercent CPUUtilizationPercent `json:"cpu_utilization_percent"`
	SenderTCPCongestion   string                `json:"sender_tcp_congestion"`
	ReceiverTCPCongestion string                `json:"receiver_tcp_congestion"`
}

type EndStream

type EndStream struct {
	Sender   Sum    `json:"sender"`
	Receiver Sum    `json:"receiver"`
	UDP      UDPSum `json:"udp"`
}

type GraphQLClient

type GraphQLClient interface {
	GetUpNodes(ctx context.Context, nodesNum int, farmID, excludeFarmID uint32, ipv4, ipv6 bool) ([]graphql.Node, error)
}

GraphQLClient interface for mocking GraphQL operations

type Interval

type Interval struct {
	Streams []IntervalStream `json:"streams"`
	Sum     Sum              `json:"sum"`
}

type IntervalStream

type IntervalStream struct {
	Socket        int64   `json:"socket"`
	Start         float64 `json:"start"`
	End           float64 `json:"end"`
	Seconds       float64 `json:"seconds"`
	Bytes         int64   `json:"bytes"`
	BitsPerSecond float64 `json:"bits_per_second"`
	Retransmits   int64   `json:"retransmits"`
	SndCwnd       int64   `json:"snd_cwnd"`
	SndWnd        int64   `json:"snd_wnd"`
	Rtt           int64   `json:"rtt"`
	Rttvar        int64   `json:"rttvar"`
	Pmtu          int64   `json:"pmtu"`
	Omitted       bool    `json:"omitted"`
	Sender        bool    `json:"sender"`
}

type Iperf3Server

type Iperf3Server struct {
	Host    string `json:"IP/HOST"` // IP or hostname
	Port    int    `json:"-"`       // Not directly unmarshaled
	PortStr string `json:"PORT"`    // Port comes as string in JSON
}

Iperf3Server represents a public iperf3 server from the list

func (*Iperf3Server) UnmarshalJSON

func (s *Iperf3Server) UnmarshalJSON(data []byte) error

UnmarshalJSON custom unmarshaler to handle port as string or port range

type IperfResult

type IperfResult struct {
	UploadSpeed   float64               `json:"upload_speed"`   // in bit/sec
	DownloadSpeed float64               `json:"download_speed"` // in bit/sec
	ServerHost    string                `json:"server_host"`
	ServerIP      string                `json:"server_ip"`
	ServerPort    int                   `json:"server_port"`
	TestType      string                `json:"test_type"`
	Error         string                `json:"error"`
	CpuReport     CPUUtilizationPercent `json:"cpu_report"`
}

IperfResult for iperf test results

type IperfTest

type IperfTest struct {
	// contains filtered or unexported fields
}

IperfTest for iperf tcp/udp tests

func (*IperfTest) Cron

func (t *IperfTest) Cron() string

Cron returns the schedule for the tcp task

func (*IperfTest) Description

func (t *IperfTest) Description() string

Description returns the task description

func (*IperfTest) ID

func (t *IperfTest) ID() string

ID returns the ID of the tcp task

func (*IperfTest) Jitter

func (t *IperfTest) Jitter() uint32

Jitter returns the max number of seconds the job can sleep before actual execution.

func (*IperfTest) Run

func (t *IperfTest) Run(ctx context.Context) (interface{}, error)

Run runs the tcp test and returns the result

type MockGraphQLClient

type MockGraphQLClient struct {
	// contains filtered or unexported fields
}

MockGraphQLClient is a mock of GraphQLClient interface.

func NewMockGraphQLClient

func NewMockGraphQLClient(ctrl *gomock.Controller) *MockGraphQLClient

NewMockGraphQLClient creates a new mock instance.

func (*MockGraphQLClient) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockGraphQLClient) GetUpNodes

func (m *MockGraphQLClient) GetUpNodes(ctx context.Context, nodesNum int, farmID, excludeFarmID uint32, ipv4, ipv6 bool) ([]graphql.Node, error)

GetUpNodes mocks base method.

type MockGraphQLClientMockRecorder

type MockGraphQLClientMockRecorder struct {
	// contains filtered or unexported fields
}

MockGraphQLClientMockRecorder is the mock recorder for MockGraphQLClient.

func (*MockGraphQLClientMockRecorder) GetUpNodes

func (mr *MockGraphQLClientMockRecorder) GetUpNodes(ctx, nodesNum, farmID, excludeFarmID, ipv4, ipv6 any) *gomock.Call

GetUpNodes indicates an expected call of GetUpNodes.

type Start

type Start struct {
	Connected     []Connected  `json:"connected"`
	Version       string       `json:"version"`
	SystemInfo    string       `json:"system_info"`
	Timestamp     Timestamp    `json:"timestamp"`
	ConnectingTo  ConnectingTo `json:"connecting_to"`
	Cookie        string       `json:"cookie"`
	TCPMssDefault int64        `json:"tcp_mss_default"`
	TargetBitrate int64        `json:"target_bitrate"`
	FqRate        int64        `json:"fq_rate"`
	SockBufsize   int64        `json:"sock_bufsize"`
	SndbufActual  int64        `json:"sndbuf_actual"`
	RcvbufActual  int64        `json:"rcvbuf_actual"`
	TestStart     TestStart    `json:"test_start"`
}

type Sum

type Sum struct {
	Socket        int64   `json:"socket"`
	Start         float64 `json:"start"`
	End           float64 `json:"end"`
	Seconds       float64 `json:"seconds"`
	Bytes         int64   `json:"bytes"`
	BitsPerSecond float64 `json:"bits_per_second"`
	Retransmits   int64   `json:"retransmits"`
	MaxSndCwnd    int64   `json:"max_snd_cwnd"`
	MaxSndWnd     int64   `json:"max_snd_wnd"`
	MaxRtt        int64   `json:"max_rtt"`
	MinRtt        int64   `json:"min_rtt"`
	MeanRtt       int64   `json:"mean_rtt"`
	Sender        bool    `json:"sender"`
}

type TestStart

type TestStart struct {
	Protocol      string `json:"protocol"`
	NumStreams    int64  `json:"num_streams"`
	Blksize       int64  `json:"blksize"`
	Omit          int64  `json:"omit"`
	Duration      int64  `json:"duration"`
	Bytes         int64  `json:"bytes"`
	Blocks        int64  `json:"blocks"`
	Reverse       int64  `json:"reverse"`
	Tos           int64  `json:"tos"`
	TargetBitrate int64  `json:"target_bitrate"`
	Bidir         int64  `json:"bidir"`
	Fqrate        int64  `json:"fqrate"`
}

type Timestamp

type Timestamp struct {
	Time     string `json:"time"`
	Timesecs int64  `json:"timesecs"`
}

type UDPSum

type UDPSum struct {
	Socket        int64   `json:"socket"`
	Start         float64 `json:"start"`
	End           float64 `json:"end"`
	Seconds       float64 `json:"seconds"`
	Bytes         int64   `json:"bytes"`
	BitsPerSecond float64 `json:"bits_per_second"`
	JitterMS      float64 `json:"jitter_ms"`
	LostPackets   int64   `json:"lost_packets"`
	Packets       int64   `json:"packets"`
	LostPercent   float64 `json:"lost_percent"`
	OutOfOrder    int64   `json:"out_of_order"`
	Sender        bool    `json:"sender"`
}

Jump to

Keyboard shortcuts

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