kubernetesk8s.io/kubernetes/test/integration/ipamperf Index | Files

package ipamperf

import "k8s.io/kubernetes/test/integration/ipamperf"

Index

Types

type Config

type Config struct {
	CreateQPS     int                     // rate at which nodes are created
	KubeQPS       int                     // rate for communication with kubernetes API
	CloudQPS      int                     // rate for communication with cloud endpoint
	NumNodes      int                     // number of nodes to created and monitored
	AllocatorType ipam.CIDRAllocatorType  // type of allocator to run
	Cloud         cloudprovider.Interface // cloud provider
}

Config represents the test configuration that is being run

type JSONDuration

type JSONDuration time.Duration

JSONDuration is an alias of time.Duration to support custom Marshal code

func (*JSONDuration) MarshalJSON

func (jDuration *JSONDuration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface

func (*JSONDuration) UnmarshalJSON

func (jDuration *JSONDuration) UnmarshalJSON(b []byte) (err error)

UnmarshalJSON implements the json.Unmarshaler interface

type NodeDuration

type NodeDuration struct {
	Name     string       // node name
	PodCIDR  string       // the podCIDR that was assigned to the node
	Duration JSONDuration // how long it took to assign podCIDR
}

NodeDuration represents the CIDR allocation time for each node

type Observer

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

Observer represents the handle to test observer that watches for node changes and tracks behavior

func NewObserver

func NewObserver(clientSet *clientset.Clientset, numNodes int) *Observer

NewObserver creates a new observer given a handle to the Clientset

func (*Observer) Results

func (o *Observer) Results(name string, config *Config) *Results

Results returns the test results. It waits for the observer to finish and returns the computed results of the observations.

func (*Observer) StartObserving

func (o *Observer) StartObserving() error

StartObserving starts an asynchronous loop to monitor for node changes. Call Results() to get the test results after starting observer.

type Results

type Results struct {
	Name           string         // name for the test
	Config         *Config        // handle to the test config
	Succeeded      bool           // whether all nodes were assigned podCIDR
	MaxAllocTime   JSONDuration   // the maximum time take for assignment per node
	TotalAllocTime JSONDuration   // duration between first addition and last assignment
	NodeAllocTime  []NodeDuration // assignment time by node name
}

Results represents the observed test results.

func (*Results) String

func (results *Results) String() string

String implements the Stringer interface and returns a multi-line representation of the test results.

Source Files

results.go

Version
v1.33.0 (latest)
Published
Apr 23, 2025
Platform
linux/amd64
Imports
13 packages
Last checked
3 hours ago

Tools for package owners.