gatherers

package
v0.0.0-...-392b1d9 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerResourceGatherer

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

ContainerResourceGatherer gathers resource metrics from containers.

func NewResourceUsageGatherer

func NewResourceUsageGatherer(c clientset.Interface, host, provider string, options ResourceGathererOptions, pods *corev1.PodList) (*ContainerResourceGatherer, error)

NewResourceUsageGatherer creates new instance of ContainerResourceGatherer

func (*ContainerResourceGatherer) Dispose

func (g *ContainerResourceGatherer) Dispose()

Dispose disposes container resource gatherer.

func (*ContainerResourceGatherer) StartGatheringData

func (g *ContainerResourceGatherer) StartGatheringData()

StartGatheringData starts a stat gathering worker blocks for each node to track, and blocks until StopAndSummarize is called.

func (*ContainerResourceGatherer) StopAndSummarize

func (g *ContainerResourceGatherer) StopAndSummarize(percentiles []int) (*ResourceUsageSummary, error)

StopAndSummarize stops stat gathering workers, processes the collected stats, generates resource summary for the passed-in percentiles, and returns the summary.

type NodesSet

type NodesSet int

NodesSet is a flag defining the node set range.

const (
	// AllNodes - all containers on all nodes
	AllNodes NodesSet = 0
	// MasterNodes - all containers on Master nodes only
	MasterNodes NodesSet = 1
	// MasterAndDNSNodes - all containers on Master nodes and DNS containers on other nodes
	MasterAndDNSNodes NodesSet = 2
)

type ResourceGathererOptions

type ResourceGathererOptions struct {
	InKubemark                        bool
	Nodes                             NodesSet
	ResourceDataGatheringPeriod       time.Duration
	MasterResourceDataGatheringPeriod time.Duration
	PrintVerboseLogs                  bool
}

ResourceGathererOptions specifies options for ContainerResourceGatherer.

type ResourceUsageSummary

type ResourceUsageSummary map[string][]util.SingleContainerSummary

ResourceUsageSummary represents summary of resource usage per container.

func (*ResourceUsageSummary) Get

Get returns collection of SingleContainerSummaries for given percentile.

Jump to

Keyboard shortcuts

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