metrics

package
v0.0.173 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: Apache-2.0 Imports: 1 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 CycleReporter added in v0.0.111

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

CycleReporter reports the status of the task that spawned it and how long it took.

func (*CycleReporter) Fail added in v0.0.111

func (pr *CycleReporter) Fail()

Fail reports a failure or unexpected error

func (*CycleReporter) Skip added in v0.0.111

func (pr *CycleReporter) Skip()

Skip reports a cycle that was skipped due to an expected condition, flag, or configuration

func (*CycleReporter) Success added in v0.0.111

func (pr *CycleReporter) Success()

Success reports success

type Cyclic added in v0.0.111

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

Cyclic is a collection of metrics that measures how long a task takes to complete

func (*Cyclic) Start added in v0.0.111

func (p *Cyclic) Start() *CycleReporter

Start returns a PeriodicReporter that logs metrics when one of its methods are called.

type Duration added in v0.0.112

type Duration interface {
	Metric
	Set(time.Duration, ...string)
}

Duration is a metric describing a length of time

type Factory added in v0.0.111

type Factory struct {
	NewInt64    func(name, desc string, fields ...string) Int64
	NewCounter  func(name, desc string, fields ...string) Counter
	NewDuration func(name, desc string, fields ...string) Duration
}

Factory is a collection of functions that create metrics

func (Factory) NewCyclic added in v0.0.111

func (f Factory) NewCyclic(componentName string) Cyclic

NewCyclic derives a cycle metric from the given metrics

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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