Documentation
¶
Index ¶
- type HistogramStatsCollector
- func (c *HistogramStatsCollector) Decr(stat Stat, value int64)
- func (c *HistogramStatsCollector) Gauge(stat Stat, value int64)
- func (c *HistogramStatsCollector) Histogram(stat Stat, value int64)
- func (c *HistogramStatsCollector) Incr(stat Stat, value int64)
- func (c *HistogramStatsCollector) Mean(stat Stat) float64
- func (c *HistogramStatsCollector) Median(stat Stat) float64
- func (c *HistogramStatsCollector) Percentile(stat Stat, p float64) float64
- func (c *HistogramStatsCollector) Timing(stat Stat, value int64)
- type Stat
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HistogramStatsCollector ¶
type HistogramStatsCollector struct {
// contains filtered or unexported fields
}
func NewHistogramStatsCollector ¶
func NewHistogramStatsCollector() *HistogramStatsCollector
NewHistogramStatsCollector creates a new histogram stats collector.
func (*HistogramStatsCollector) Decr ¶
func (c *HistogramStatsCollector) Decr(stat Stat, value int64)
Decr decrements the count of a statistic by the given value.
func (*HistogramStatsCollector) Gauge ¶
func (c *HistogramStatsCollector) Gauge(stat Stat, value int64)
Gauge records the current value of a statistic.
func (*HistogramStatsCollector) Histogram ¶
func (c *HistogramStatsCollector) Histogram(stat Stat, value int64)
Histogram records the statistical distribution of a set of values.
func (*HistogramStatsCollector) Incr ¶
func (c *HistogramStatsCollector) Incr(stat Stat, value int64)
Incr increments the count of a statistic by the given value.
func (*HistogramStatsCollector) Mean ¶
func (c *HistogramStatsCollector) Mean(stat Stat) float64
Mean returns the mean value of a statistic.
func (*HistogramStatsCollector) Median ¶
func (c *HistogramStatsCollector) Median(stat Stat) float64
Median returns the median value of a statistic.
func (*HistogramStatsCollector) Percentile ¶
func (c *HistogramStatsCollector) Percentile(stat Stat, p float64) float64
Percentile returns the pth percentile value of a statistic.
func (*HistogramStatsCollector) Timing ¶
func (c *HistogramStatsCollector) Timing(stat Stat, value int64)
Timing records the time it took for an event to occur.
type Stat ¶
type Stat string
Stat defines a type Stat as an alias for string, and five constants of type Stat. The constants are used to represent different stat values that can be collected by the stats collector.
const ( StatIncr Stat = "incr" // represent a stat that should be incremented StatDecr Stat = "decr" // represent a stat that should be decremented StatTiming Stat = "timing" //represent a stat that represents the time it takes for an event to occur StatGauge Stat = "gauge" // represent a stat that represents the current value of a statistic StatHistogram Stat = "histogram" //represent a stat that represents the statistical distribution of a set of values )