Documentation ¶
Index ¶
- type BasicMeter
- type FullMeter
- type Metrics
- func (m *Metrics) Distribution(name string, value float64)
- func (m *Metrics) Duration(name string, start time.Time)
- func (m *Metrics) Hit(name string, start time.Time)
- func (m *Metrics) Miss(name string, start time.Time)
- func (m *Metrics) Occurence(name string)
- func (m *Metrics) Outcome(name string, outcome string, start time.Time)
- func (m *Metrics) Size(name string, size int64)
- func (m *Metrics) Value(name string, value float64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicMeter ¶
type BasicMeter interface { // Occurence - Something worth measuring happened // Data worth knowing: // How many times total did it happen // How many event / time is happening Occurence(name string) //moment // Duration - Called after a process has completed, captures both that an // occurence of a process happened and how long it took. Duration(name string, start time.Time) // Distribution - Capture the distribution of a value. Mean, Max, Min, Avg, 95% Distribution(name string, value float64) // Current - A value where the actual value is the only thing that matters. A level or gauge. Value(name string, value float64) // Size - Track payload sizes Size(name string, size int64) }
BasicMeter Discussion Points - Why does duration & size exist on the interface when they can be covered by the other interfaces? A: Believe that fundamental building blocks, the atoms, of a system should be easily tracked Duration and Data Size are fundamental building blocks for reasoning about a software system.
func NewBasicMeter ¶
func NewBasicMeter(name, environment string, tags ...string) BasicMeter
type FullMeter ¶
type Metrics ¶
type Metrics struct { //Name - the name of this group of metrics Name string Tags []string Hostname string Environment string }
func (*Metrics) Distribution ¶
Distribution - Capture the distribution of a value. Mean, Max, Min, Avg, 95%
func (*Metrics) Duration ¶
Duration - Called after a process has completed, captures both that an occurence of a process happened and how long it took.
Click to show internal directories.
Click to hide internal directories.