recommender

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: Apache-2.0 Imports: 7 Imported by: 36

Documentation

Overview

Package recommender (aka metrics_recommender) - code for metrics of VPA Recommender

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExecutionTimer

func NewExecutionTimer() *metrics.ExecutionTimer

NewExecutionTimer provides a timer for Recommender's RunOnce execution

func ObserveRecommendationLatency

func ObserveRecommendationLatency(created time.Time)

ObserveRecommendationLatency observes the time it took for the first recommendation to appear

func RecordAggregateContainerStatesCount

func RecordAggregateContainerStatesCount(statesCount int)

RecordAggregateContainerStatesCount records the number of containers being tracked by the recommender

func RecordMetricsServerResponse added in v0.12.0

func RecordMetricsServerResponse(err error, clientName string)

RecordMetricsServerResponse records result of a query to metrics server

func Register

func Register()

Register initializes all metrics for VPA Recommender

Types

type ObjectCounter

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

ObjectCounter helps split all VPA objects into buckets

func NewObjectCounter

func NewObjectCounter() *ObjectCounter

NewObjectCounter creates a new helper to split VPA objects into buckets

func (*ObjectCounter) Add

func (oc *ObjectCounter) Add(vpa *model.Vpa)

Add updates the helper state to include the given VPA object

func (*ObjectCounter) Observe

func (oc *ObjectCounter) Observe()

Observe passes all the computed bucket values to metrics

Jump to

Keyboard shortcuts

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