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

statstest

package
v4.9.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisableVersionReporting added in v4.8.0

func DisableVersionReporting(tb testing.TB)

DisableVersionReporting disables the v5 behavior of injecting `go_version` and `stats_version` tags, which v4 tests don't necessarily expect.

Types

type Handler

type Handler struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Handler is a stats handler that can record measures for inspection.

func (*Handler) Clear

func (h *Handler) Clear()

Clear removes all measures held by Handler.

func (*Handler) Flush

func (h *Handler) Flush()

Flush Increments Flush counter.

func (*Handler) FlushCalls

func (h *Handler) FlushCalls() int

FlushCalls returns the number of times `Flush` has been invoked.

func (*Handler) HandleMeasures

func (h *Handler) HandleMeasures(_ time.Time, measures ...stats.Measure)

HandleMeasures process a variadic list of stats.Measure.

func (*Handler) Measures

func (h *Handler) Measures() []stats.Measure

Measures returns a copy of the handled measures.

Jump to

Keyboard shortcuts

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