forked from mirror/go-ethereum
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
490 B
23 lines
490 B
7 years ago
|
package metrics
|
||
|
|
||
|
import (
|
||
|
"net"
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
func ExampleGraphite() {
|
||
|
addr, _ := net.ResolveTCPAddr("net", ":2003")
|
||
|
go Graphite(DefaultRegistry, 1*time.Second, "some.prefix", addr)
|
||
|
}
|
||
|
|
||
|
func ExampleGraphiteWithConfig() {
|
||
|
addr, _ := net.ResolveTCPAddr("net", ":2003")
|
||
|
go GraphiteWithConfig(GraphiteConfig{
|
||
|
Addr: addr,
|
||
|
Registry: DefaultRegistry,
|
||
|
FlushInterval: 1 * time.Second,
|
||
|
DurationUnit: time.Millisecond,
|
||
|
Percentiles: []float64{0.5, 0.75, 0.99, 0.999},
|
||
|
})
|
||
|
}
|