metrics

package
v0.0.100 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 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

This section is empty.

Types

type Counter

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

Counter is a strictly-increasing metric.

type Int64

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

Int64 is an int64 metric.

type Metric

type Metric interface {
	Name() string
}

Metric contains common metric functions.

type Reporter added in v0.0.77

type Reporter []Valuer

Reporter is a collection of metric values to report.

func (*Reporter) Counter added in v0.0.77

func (r *Reporter) Counter(name, desc string, log logrus.FieldLogger, fields ...string) Counter

Counter configures a new Counter metric to report

func (*Reporter) Int64 added in v0.0.77

func (r *Reporter) Int64(name, desc string, log logrus.FieldLogger, fields ...string) Int64

Int64 configures a new Int64 metric to report.

func (*Reporter) Report added in v0.0.77

func (r *Reporter) Report(ctx context.Context, log logrus.FieldLogger, freq time.Duration) error

Report the status of its metrics every freq until the context expires.

type Valuer added in v0.0.76

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

Valuer extends a metric to include a report on its values.

Jump to

Keyboard shortcuts

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