metrics

package
v0.0.76 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package metrics provides metric reporting for TestGrid components.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Report added in v0.0.76

func Report(ctx context.Context, log logrus.FieldLogger, freq time.Duration, metrics ...Valuer) error

Types

type Counter

type Counter interface {
	Metric
	Add(int64, ...string)
}

Counter is a strictly-increasing metric.

type CounterValuer added in v0.0.76

type CounterValuer interface {
	Valuer
	Counter
}

func NewLogCounter

func NewLogCounter(name, desc string, log logrus.FieldLogger, fields ...string) CounterValuer

NewLogCounter creates a new counter that logs.

type Int64

type Int64 interface {
	Metric
	Set(int64, ...string)
}

Int64 is an int64 metric.

type Int64Valuer added in v0.0.76

type Int64Valuer interface {
	Valuer
	Int64
}

func NewLogInt64

func NewLogInt64(name, desc string, log logrus.FieldLogger, fields ...string) Int64Valuer

NewLogInt64 creates a new Int64 metric that logs.

type Metric

type Metric interface {
	Name() string
}

Metric contains common metric functions.

type Valuer added in v0.0.76

type Valuer interface {
	Metric
	Values() map[string]map[string]interface{}
}

Jump to

Keyboard shortcuts

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