metrics

package
v0.0.0-...-9cb8b67 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadMetric

func ReadMetric(PrometheusPath string, PrometheusQuery string) (model2.Value, error)

func ScrapeMetrics

func ScrapeMetrics(metric model.AutoscalingDefinitionMetric, testDuration time.Duration, scrapeDuration time.Duration) (scrapedMetricsChannel chan []MetricValidateResult, scrapeInterval chan bool)

func TestSingleValueBounds

func TestSingleValueBounds(metric model.AutoscalingDefinitionMetric, value float64) (bool, bool)

Types

type MetricValidateResult

type MetricValidateResult struct {
	LowerBoundPassed bool
	UpperBoundPassed bool
	MetricName       string
	IsMetricValid    bool
	Value            []model2.Value
}

func ValidateMetricBounds

func ValidateMetricBounds(value model2.Value, metric model.AutoscalingDefinitionMetric) (MetricValidateResult, error)

public functions

type MetricValidateResultMap

type MetricValidateResultMap struct {
	Name        string
	ScrapedList []MetricValidateResult
}

type ScrapeResultChannel

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

type TestResult

type TestResult struct {
	LowerBoundTestPassed bool
	UpperBoundTestPassed bool
	MetricName           string
	Value                float64
}

type TestResultsChannel

type TestResultsChannel struct {
	TestResultsChannel chan TestResult
	ScrapeInterval     chan bool
	TestInterval       chan bool
}

func MakeTest

func MakeTest(metric model.AutoscalingDefinitionMetric, scrapeResultChannel ScrapeResultChannel) (TestResultsChannel, error)

public functions

type ValueScalar

type ValueScalar struct {
	*model2.Scalar
}

type ValueString

type ValueString struct {
	*model2.String
}

private model and functions

Jump to

Keyboard shortcuts

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