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 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 ¶
func (r *ResourceUsageSummary) Get(perc string) []util.SingleContainerSummary
Get returns collection of SingleContainerSummaries for given percentile.