recommender

package
v0.0.0-...-2908132 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

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 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