xmetrics

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2019 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestStatsReporter

type TestStatsReporter interface {
	tally.StatsReporter
	Counters() map[string]int64
	Gauges() map[string]float64
	Timers() map[string][]time.Duration
	Events() []TestStatsReporterEvent
}

TestStatsReporter is a test reporter that collects metrics and makes them accessible for testing purposes

func NewTestStatsReporter

func NewTestStatsReporter(opts TestStatsReporterOptions) TestStatsReporter

NewTestStatsReporter returns a new TestStatsReporter

type TestStatsReporterEvent

type TestStatsReporterEvent interface {
	Name() string
	Tags() map[string]string
	IsCounter() bool
	IsGauge() bool
	IsTimer() bool
	Value() int64
	TimerValue() time.Duration
}

TestStatsReporterEvent is an event that was reported to the test reporter

type TestStatsReporterOptions

type TestStatsReporterOptions interface {
	// SetTimersDisable sets whether to disable timers
	SetTimersDisable(value bool) TestStatsReporterOptions

	// SetTimersDisable returns whether to disable timers
	TimersDisabled() bool

	// SetCaptureEvents sets whether to capture each event
	SetCaptureEvents(value bool) TestStatsReporterOptions

	// SetCaptureEvents returns whether to capture each event
	CaptureEvents() bool
}

TestStatsReporterOptions is a set of options for a test stats reporter

func NewTestStatsReporterOptions

func NewTestStatsReporterOptions() TestStatsReporterOptions

NewTestStatsReporterOptions creates a new set of options for a test stats reporter

Jump to

Keyboard shortcuts

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