diff options
Diffstat (limited to 'Godeps/_workspace/src/github.com/rcrowley/go-metrics/graphite_test.go')
-rw-r--r-- | Godeps/_workspace/src/github.com/rcrowley/go-metrics/graphite_test.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/graphite_test.go b/Godeps/_workspace/src/github.com/rcrowley/go-metrics/graphite_test.go new file mode 100644 index 000000000..b49dc4bb5 --- /dev/null +++ b/Godeps/_workspace/src/github.com/rcrowley/go-metrics/graphite_test.go @@ -0,0 +1,22 @@ +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 }, + }) +} |