package metrics
import "github.com/coreos/etcd/metrics"
Package metrics provides both a means of generating metrics and the ability to send metric data to a graphite endpoint. The usage of this package without providing a graphite_addr when calling NewBucket results in NOP metric objects. No data will be collected.
Index ¶
Constants ¶
const ( // RuntimeMemStatsSampleInterval is the interval in seconds at which the // Go runtime's memory statistics will be gathered. RuntimeMemStatsSampleInterval = time.Duration(2) * time.Second // GraphitePublishInterval is the interval in seconds at which all // gathered statistics will be published to a Graphite endpoint. GraphitePublishInterval = time.Duration(2) * time.Second )
Types ¶
type Bucket ¶
type Bucket interface { // If a timer exists in this Bucket, return it. Otherwise, create // a new timer with the given name and store it in this Bucket. // The returned object will fulfull the Timer interface. Timer(name string) Timer // This acts similarly to Timer, but with objects that fufill the // Gauge interface. Gauge(name string) Gauge // Write the current state of all Metrics in a human-readable format // to the provide io.Writer. Dump(io.Writer) // Instruct the Bucket to periodically push all metric data to the // provided graphite endpoint. Publish(string) error }
func NewBucket ¶
Create a new Bucket object that periodically
type Gauge ¶
type Timer ¶
Source Files ¶
- Version
- v0.4.8
- Published
- Mar 23, 2015
- Platform
- js/wasm
- Imports
- 5 packages
- Last checked
- 22 seconds ago –
Tools for package owners.