Documentation ¶
Index ¶
- type TestStatsReporter
- func (r *TestStatsReporter) Capabilities() tally.Capabilities
- func (r *TestStatsReporter) Flush()
- func (r *TestStatsReporter) ReportCounter(name string, tags map[string]string, value int64)
- func (r *TestStatsReporter) ReportGauge(name string, tags map[string]string, value float64)
- func (r *TestStatsReporter) ReportHistogramDurationSamples(name string, tags map[string]string, buckets tally.Buckets, ...)
- func (r *TestStatsReporter) ReportHistogramValueSamples(name string, tags map[string]string, buckets tally.Buckets, ...)
- func (r *TestStatsReporter) ReportTimer(name string, tags map[string]string, interval time.Duration)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestStatsReporter ¶
type TestStatsReporter struct { CountersWG sync.WaitGroup GaugesWG sync.WaitGroup TimersWG sync.WaitGroup Counters map[string]int64 Gauges map[string]float64 Timers map[string]time.Duration HistogramSamples map[string]tally.Buckets HistogramDurations map[string]tally.Buckets // contains filtered or unexported fields }
TestStatsReporter allows for easy testing of any metrics related functionality
func NewTestScope ¶
func NewTestScope() (tally.Scope, *TestStatsReporter)
NewTestScope returns a pair of scope and reporter that can be used for testing
func NewTestStatsReporter ¶
func NewTestStatsReporter() *TestStatsReporter
NewTestStatsReporter returns new instance of test stats reporter
func (*TestStatsReporter) Capabilities ¶
func (r *TestStatsReporter) Capabilities() tally.Capabilities
Capabilities is a nop in this case
func (*TestStatsReporter) ReportCounter ¶
func (r *TestStatsReporter) ReportCounter(name string, tags map[string]string, value int64)
ReportCounter collects all the counters into a map
func (*TestStatsReporter) ReportGauge ¶
func (r *TestStatsReporter) ReportGauge(name string, tags map[string]string, value float64)
ReportGauge collects all the gauges into a map
func (*TestStatsReporter) ReportHistogramDurationSamples ¶
func (r *TestStatsReporter) ReportHistogramDurationSamples( name string, tags map[string]string, buckets tally.Buckets, bucketLowerBound, bucketUpperBound time.Duration, samples int64, )
ReportHistogramDurationSamples reports histogram samples for a bucket
func (*TestStatsReporter) ReportHistogramValueSamples ¶
func (r *TestStatsReporter) ReportHistogramValueSamples( name string, tags map[string]string, buckets tally.Buckets, bucketLowerBound, bucketUpperBound float64, samples int64, )
ReportHistogramValueSamples reports histogram samples for a bucket
func (*TestStatsReporter) ReportTimer ¶
func (r *TestStatsReporter) ReportTimer(name string, tags map[string]string, interval time.Duration)
ReportTimer collects all the timers into a map
Click to show internal directories.
Click to hide internal directories.