Help us shape the future of Go! Take the 2026 Go Developer Survey

metrics

package
v1.16.21 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metric

type Metric struct {
	Value float64
	Name  string
}

type Metrics

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

func New

func New(t assert.TestingT, ctx context.Context, url string) *Metrics

func (*Metrics) All

func (m *Metrics) All() map[string]float64

func (*Metrics) MatchMetric

func (m *Metrics) MatchMetric(substrings ...string) []Metric

MatchMetric returns all metrics that contain all the substrings in the key This is useful because of the way we serialize labels in the metrics name

func (*Metrics) MatchMetricAndSum

func (m *Metrics) MatchMetricAndSum(t assert.TestingT, sum float64, substrings ...string) bool

MatchMetricAndSum returns true if the set of metrics has a specific sum

type MetricsWithLabels added in v1.16.0

type MetricsWithLabels struct {
	Metrics map[string]map[string]float64
}

func NewWithLabels added in v1.16.0

func NewWithLabels(t *testing.T, ctx context.Context, url string) *MetricsWithLabels

Jump to

Keyboard shortcuts

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