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

statstest

package
v5.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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