graphite_test.go 490 B

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