metrics

package
v1.16.13 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: Apache-2.0 Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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