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

telemetrytest

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package telemetrytest reads back what Pando recorded, for tests asserting that a piece of work is measured (R-399).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

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

Reader is what was recorded since Install.

func Install

func Install(t *testing.T, sources telemetry.Sources) *Reader

Install records into a reader the test can read, until the test ends.

Recording is process-wide, so a test using this must not run in parallel with another that does.

func (*Reader) Count

func (r *Reader) Count(name string, attrs map[string]string) int64

Count is how many times the named metric was recorded with every one of attrs: a histogram's count, or a counter's sum. Attributes not named are ignored.

func (*Reader) Metrics

func (r *Reader) Metrics() map[string]metricdata.Metrics

Metrics collects everything recorded so far, by name.

Jump to

Keyboard shortcuts

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