github.com/phillinzzz/newBsc@v1.1.6/metrics/graphite_test.go (about) 1 package metrics 2 3 import ( 4 "net" 5 "time" 6 ) 7 8 func ExampleGraphite() { 9 addr, _ := net.ResolveTCPAddr("net", ":2003") 10 go Graphite(DefaultRegistry, 1*time.Second, "some.prefix", addr) 11 } 12 13 func ExampleGraphiteWithConfig() { 14 addr, _ := net.ResolveTCPAddr("net", ":2003") 15 go GraphiteWithConfig(GraphiteConfig{ 16 Addr: addr, 17 Registry: DefaultRegistry, 18 FlushInterval: 1 * time.Second, 19 DurationUnit: time.Millisecond, 20 Percentiles: []float64{0.5, 0.75, 0.99, 0.999}, 21 }) 22 }