kubernetes/test/e2e/framework/kubelet/stats.go

const proxyTimeout

const dockerOperationsKey

const dockerOperationsErrorsKey

const dockerOperationsTimeoutKey

type ContainerResourceUsage

type ResourceUsagePerContainer

type ResourceUsagePerNode

type ContainersCPUSummary

type NodesCPUSummary

type RuntimeOperationMonitor

type NodeRuntimeOperationErrorRate

type RuntimeOperationErrorRate

// ProxyRequest performs a get on a node proxy endpoint given the nodename and rest client.
func ProxyRequest(ctx context.Context, c clientset.Interface, node, endpoint string, port int) (restclient.Result, error) {}

// NewRuntimeOperationMonitor returns a new RuntimeOperationMonitor.
func NewRuntimeOperationMonitor(ctx context.Context, c clientset.Interface) *RuntimeOperationMonitor {}

// GetRuntimeOperationErrorRate gets runtime operation records from kubelet metrics and calculate
// error rates of all runtime operations.
func (m *RuntimeOperationMonitor) GetRuntimeOperationErrorRate(ctx context.Context) map[string]NodeRuntimeOperationErrorRate {}

// GetLatestRuntimeOperationErrorRate gets latest error rate and timeout rate from last observed RuntimeOperationErrorRate.
func (m *RuntimeOperationMonitor) GetLatestRuntimeOperationErrorRate(ctx context.Context) map[string]NodeRuntimeOperationErrorRate {}

// FormatRuntimeOperationErrorRate formats the runtime operation error rate to string.
func FormatRuntimeOperationErrorRate(nodesResult map[string]NodeRuntimeOperationErrorRate) string {}

// getNodeRuntimeOperationErrorRate gets runtime operation error rate from specified node.
func getNodeRuntimeOperationErrorRate(ctx context.Context, c clientset.Interface, node string) (NodeRuntimeOperationErrorRate, error) {}

// GetStatsSummary contacts kubelet for the container information.
func GetStatsSummary(ctx context.Context, c clientset.Interface, nodeName string) (*kubeletstatsv1alpha1.Summary, error) {}

func getNodeStatsSummary(ctx context.Context, c clientset.Interface, nodeName string) (*kubeletstatsv1alpha1.Summary, error) {}

func getSystemContainerStats(summary *kubeletstatsv1alpha1.Summary) map[string]*kubeletstatsv1alpha1.ContainerStats {}

const rootContainerName

// TargetContainers returns a list of containers for which we want to collect resource usage.
func TargetContainers() []string {}

func formatResourceUsageStats(nodeName string, containerStats ResourceUsagePerContainer) string {}

// GetKubeletHeapStats returns stats of kubelet heap.
func GetKubeletHeapStats(ctx context.Context, c clientset.Interface, nodeName string) (string, error) {}

func computeContainerResourceUsage(name string, oldStats, newStats *kubeletstatsv1alpha1.ContainerStats) *ContainerResourceUsage {}

type resourceCollector

func newResourceCollector(c clientset.Interface, nodeName string, containerNames []string, pollingInterval time.Duration) *resourceCollector {}

// Start starts a goroutine to Poll the node every pollingInterval.
func (r *resourceCollector) Start(ctx context.Context) {}

// Stop sends a signal to terminate the stats collecting goroutine.
func (r *resourceCollector) Stop() {}

// collectStats gets the latest stats from kubelet stats summary API, computes
// the resource usage, and pushes it to the buffer.
func (r *resourceCollector) collectStats(ctx context.Context, oldStatsMap map[string]*kubeletstatsv1alpha1.ContainerStats) {}

func (r *resourceCollector) GetLatest() (ResourceUsagePerContainer, error) {}

// Reset frees the stats and start over.
func (r *resourceCollector) Reset() {}

type resourceUsageByCPU

func (r resourceUsageByCPU) Len() int           {}

func (r resourceUsageByCPU) Swap(i, j int)      {}

func (r resourceUsageByCPU) Less(i, j int) bool {}

var percentiles

// GetBasicCPUStats returns the percentiles the cpu usage in cores for
// containerName. This method examines all data currently in the buffer.
func (r *resourceCollector) GetBasicCPUStats(containerName string) map[float64]float64 {}

type ResourceMonitor

// NewResourceMonitor returns a new ResourceMonitor.
func NewResourceMonitor(c clientset.Interface, containerNames []string, pollingInterval time.Duration) *ResourceMonitor {}

// Start starts collectors.
func (r *ResourceMonitor) Start(ctx context.Context) {}

// Stop stops collectors.
func (r *ResourceMonitor) Stop() {}

// Reset resets collectors.
func (r *ResourceMonitor) Reset() {}

// LogLatest outputs the latest resource usage into log.
func (r *ResourceMonitor) LogLatest() {}

// FormatResourceUsage returns the formatted string for LogLatest().
// TODO(oomichi): This can be made to local function after making test/e2e/node/kubelet_perf.go use LogLatest directly instead.
func (r *ResourceMonitor) FormatResourceUsage(s ResourceUsagePerNode) string {}

// GetLatest returns the latest resource usage.
func (r *ResourceMonitor) GetLatest() (ResourceUsagePerNode, error) {}

// GetMasterNodeLatest returns the latest resource usage of master and node.
func (r *ResourceMonitor) GetMasterNodeLatest(usagePerNode ResourceUsagePerNode) ResourceUsagePerNode {}

// FormatCPUSummary returns the string of human-readable CPU summary from the specified summary data.
func (r *ResourceMonitor) FormatCPUSummary(summary NodesCPUSummary) string {}

// LogCPUSummary outputs summary of CPU into log.
func (r *ResourceMonitor) LogCPUSummary() {}

// GetCPUSummary returns summary of CPU.
func (r *ResourceMonitor) GetCPUSummary() NodesCPUSummary {}

// GetMasterNodeCPUSummary returns summary of master node CPUs.
func (r *ResourceMonitor) GetMasterNodeCPUSummary(summaryPerNode NodesCPUSummary) NodesCPUSummary {}