metrics

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckThreshold

func CheckThreshold(thresholds []types.LatencyThreshold, quantiles []interface{}) error

CheckThreshold checks latency thresholds returns a concatenated list of error strings with a new line between each string

Types

type LatencyQuantiles

type LatencyQuantiles struct {
	QuantileName string      `json:"quantileName"`
	UUID         string      `json:"uuid"`
	P99          int         `json:"P99"`
	P95          int         `json:"P95"`
	P50          int         `json:"P50"`
	Max          int         `json:"max"`
	Avg          int         `json:"avg"`
	Timestamp    time.Time   `json:"timestamp"`
	MetricName   string      `json:"metricName"`
	JobConfig    config.Job  `json:"jobConfig"`
	Metadata     interface{} `json:"metadata,omitempty"`
}

LatencyQuantiles holds the latency measurement quantiles

func NewLatencySummary

func NewLatencySummary(input []float64, name string) LatencyQuantiles

type Watcher

type Watcher struct {
	Informer cache.SharedIndexInformer
	// contains filtered or unexported fields
}

func NewWatcher

func NewWatcher(restClient *rest.RESTClient, name string, resource string, namespace string, optionsModifier func(options *metav1.ListOptions), indexers cache.Indexers) *Watcher

NewWatcher return a new ListWatcher of the specified resource and namespace

func (*Watcher) StartAndCacheSync

func (p *Watcher) StartAndCacheSync() error

StartAndCacheSync starts informer and waits for the cache be synced.

func (*Watcher) StopWatcher

func (p *Watcher) StopWatcher() error

StopWatcher stops Watcher measurement

Jump to

Keyboard shortcuts

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