metrics

package
v0.0.0-...-ebae406 Latest Latest
Warning

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

Go to latest
Published: May 1, 2014 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

type Metrics struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func New

func New(prefix, server string) (self *Metrics)

Run time metrics with statsd reporting

func (*Metrics) Decrement

func (self *Metrics) Decrement(metric string)

Convenience function to decrement a counter

func (*Metrics) Increment

func (self *Metrics) Increment(metric string)

Convenience function to increment a counter

func (*Metrics) IncrementBy

func (self *Metrics) IncrementBy(metric string, count int)

Change the value of a counter

func (*Metrics) Prefix

func (self *Metrics) Prefix(newPrefix string)

Change the prefix used for statsd reporting

func (*Metrics) Snapshot

func (self *Metrics) Snapshot() map[string]interface{}

Return a snapshot of the metric data

func (*Metrics) Timer

func (self *Metrics) Timer(metric string, value int64)

Record a time, keeping a running average of times for the dump

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳