doc fix
JP Robinson
7 years ago
20 | 20 | ) |
21 | 21 | |
22 | 22 | // Emitter will keep track of all metrics and, once started, |
23 | // will emit the metrics via the Flush method to the given io.Writer. | |
23 | // will emit the metrics via the Flush method to the given address. | |
24 | 24 | type Emitter interface { |
25 | 25 | NewCounter(string) metrics.Counter |
26 | 26 | NewHistogram(string, int64, int64, int, ...int) metrics.Histogram |
43 | 43 | |
44 | 44 | // NewEmitter will return an Emitter that will prefix all |
45 | 45 | // metrics names with the given prefix. Once started, it will attempt to create |
46 | // a TCP connection with the given address and most metrics to the connection | |
47 | // in a Graphite-compatible format. | |
46 | // a TCP connection with the given address and periodically post metrics to the | |
47 | // connection in a Graphite-compatible format. | |
48 | 48 | func NewEmitter(addr *net.TCPAddr, prefix string) Emitter { |
49 | 49 | e := &emitter{ |
50 | 50 | addr, prefix, &sync.Mutex{}, |
226 | 226 | gauges map[int]metrics.Gauge |
227 | 227 | } |
228 | 228 | |
229 | // NewWindowedHistogram is taken from http://github.com/codahale/metrics. It returns a | |
229 | // newWindowedHistogram is taken from http://github.com/codahale/metrics. It returns a | |
230 | 230 | // windowed HDR histogram which drops data older than five minutes. |
231 | 231 | // |
232 | 232 | // The histogram exposes metrics for each passed quantile as gauges. Users are expected |