blackbox

package
v2.2.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MAGIC_METRIC_NAME = "blackbox_test_metric"
	TEN_MINUTES       = int64(600)
)

Variables

This section is empty.

Functions

func EmitMeasuredMetrics

func EmitMeasuredMetrics(sourceId string, ingressClient logcache_v1.IngressClient, logCache QueryableClient, metrics map[string]float64)

func MagicMetricNames

func MagicMetricNames() []string

func NewIngressClient

func NewIngressClient(grpcAddr string, opts ...grpc.DialOption) logcache_v1.IngressClient

func StartEmittingTestMetrics

func StartEmittingTestMetrics(sourceId string, emissionInterval time.Duration, ingressClient logcache_v1.IngressClient)

Types

type QueryableClient

type QueryableClient interface {
	PromQL(context.Context, string, ...logcache_client.PromQLOption) (*logcache_v1.PromQL_InstantQueryResult, error)
	LogCacheVMUptime(ctx context.Context) (int64, error)
}

func NewGrpcEgressClient

func NewGrpcEgressClient(grpcAddr string, opts ...grpc.DialOption) QueryableClient

func NewHttpEgressClient

func NewHttpEgressClient(httpAddr, uaaAddr, uaaClientId, uaaClientSecret string, skipTLSVerify bool) QueryableClient

type ReliabilityCalculator

type ReliabilityCalculator struct {
	SampleInterval   time.Duration
	WindowInterval   time.Duration
	WindowLag        time.Duration
	EmissionInterval time.Duration
	SourceId         string
	InfoLogger       *log.Logger
	ErrorLogger      *log.Logger
}

func (ReliabilityCalculator) Calculate

func (rc ReliabilityCalculator) Calculate(client QueryableClient) (float64, error)

func (ReliabilityCalculator) CountMetricPoints

func (rc ReliabilityCalculator) CountMetricPoints(metricName string, client QueryableClient) (uint64, error)

func (ReliabilityCalculator) ExpectedSamples

func (rc ReliabilityCalculator) ExpectedSamples() float64

Jump to

Keyboard shortcuts

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