statsd

package
v0.0.0-...-54d14c8 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2018 License: MIT Imports: 13 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// UDP packet limit, see
	// https://en.wikipedia.org/wiki/User_Datagram_Protocol#Packet_structure
	UDP_MAX_PACKET_SIZE int = 64 * 1024
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Address                string
	AllowedPendingMessages int
	DeleteTimings          bool
	DeleteGauges           bool
	DeleteCounters         bool
	DeleteSets             bool
}

Config - XXX

type PerformanceStruct

type PerformanceStruct struct {
	Gauges   map[string]interface{} `json:"gauges,omitempty"`   // Timers in StatsD are gauges in Amon (charts)
	Counters map[string]interface{} `json:"counters,omitempty"` // Gauges in StatsD are counters in Amon (block with value)
}

PerformanceStruct - XXX

func (PerformanceStruct) String

func (p PerformanceStruct) String() string

type PerformanceStructBlock

type PerformanceStructBlock map[string]PerformanceStruct

PerformanceStructBlock - XXX

func (PerformanceStructBlock) String

func (p PerformanceStructBlock) String() string

type RunningStats

type RunningStats struct {
	PercLimit int
	// contains filtered or unexported fields
}

lower bound, upper bound, count, and can calculate estimated percentiles. It is based on the incremental algorithm described here:

https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance

func (*RunningStats) AddValue

func (rs *RunningStats) AddValue(v float64)

func (*RunningStats) Count

func (rs *RunningStats) Count() int64

func (*RunningStats) Lower

func (rs *RunningStats) Lower() float64

func (*RunningStats) Mean

func (rs *RunningStats) Mean() float64

func (*RunningStats) Percentile

func (rs *RunningStats) Percentile(n int) float64

func (*RunningStats) Stddev

func (rs *RunningStats) Stddev() float64

func (*RunningStats) Upper

func (rs *RunningStats) Upper() float64

func (*RunningStats) Variance

func (rs *RunningStats) Variance() float64

type Statsd

type Statsd struct {
	Config Config

	// Number of messages allowed to queue up in between calls to Gather. If this
	// fills up, packets will get dropped until the next Gather interval is ran.
	AllowedPendingMessages int

	// Percentiles specifies the percentiles that will be calculated for timing
	// and histogram stats.
	Percentiles     []int
	PercentileLimit int

	// MetricSeparator is the separator between parts of the metric name.
	MetricSeparator string

	sync.Mutex
	// contains filtered or unexported fields
}

Statsd - XXX

func (*Statsd) Collect

func (s *Statsd) Collect() (interface{}, error)

func (*Statsd) Description

func (_ *Statsd) Description() string

func (*Statsd) SampleConfig

func (_ *Statsd) SampleConfig() string

func (*Statsd) SetConfigDefaults

func (s *Statsd) SetConfigDefaults() error

SetConfigDefaults - XXX

func (*Statsd) Start

func (s *Statsd) Start() error

func (*Statsd) Stop

func (s *Statsd) Stop()

Jump to

Keyboard shortcuts

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