iperf

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeployIperfPods

func DeployIperfPods(ctx context.Context, clients config.Clients, namespace string, hostnet bool, image string, port int) error

DeployIperfPods deploys iperf pods and services

Types

type ResultSummary

type ResultSummary struct {
	Retries struct {
		Direct   stats.ResultSummary `json:"pod-pod,omitempty"`
		Service  stats.ResultSummary `json:"pod-svc-pod,omitempty"`
		External stats.ResultSummary `json:"ext-svc-pod,omitempty"`
	}
	Throughput struct {
		Direct   stats.ResultSummary `json:"pod-pod,omitempty"`
		Service  stats.ResultSummary `json:"pod-svc-pod,omitempty"`
		External stats.ResultSummary `json:"ext-svc-pod,omitempty"`
	}
}

ResultSummary holds a statistical summary of the results

func SummarizeResults

func SummarizeResults(results []*Results) (*ResultSummary, error)

SummarizeResults converts a list of results into the statistical summary of the results

type Results

type Results struct {
	Direct struct {
		Retries        int     `json:"retries,omitempty"`
		Throughput     float64 `json:"throughput,omitempty"`
		ThroughputUnit string  `json:"throughput_unit,omitempty"`
	} `json:"direct,omitempty"`
	Service struct {
		Retries        int     `json:"retries,omitempty"`
		Throughput     float64 `json:"throughput,omitempty"`
		ThroughputUnit string  `json:"throughput_unit,omitempty"`
	} `json:"service,omitempty"`
	External struct {
		Retries        int     `json:"retries,omitempty"`
		Throughput     float64 `json:"throughput,omitempty"`
		ThroughputUnit string  `json:"throughput_unit,omitempty"`
	} `json:"external,omitempty"`
}

Results holds the results returned from iperf

func RunIperfTests

func RunIperfTests(ctx context.Context, clients config.Clients, testDuration int, namespace string, perfCfg config.PerfConfig) (*Results, error)

RunIperfTests runs the iperf test, to pod and to service

Jump to

Keyboard shortcuts

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