This commit is contained in:
Manfred Touron
2017-05-18 18:54:23 +02:00
parent dc386661ca
commit 5448f25fd6
645 changed files with 55908 additions and 33297 deletions

View File

@@ -38,7 +38,7 @@ type Graphite struct {
logger log.Logger
}
// New returns a Graphite object that may be used to create metrics. Prefix is
// New returns a Statsd object that may be used to create metrics. Prefix is
// applied to all created metrics. Callers must ensure that regular calls to
// WriteTo are performed, either manually or with one of the helper methods.
func New(prefix string, logger log.Logger) *Graphite {
@@ -182,9 +182,6 @@ func (g *Gauge) With(...string) metrics.Gauge { return g }
// Set implements gauge.
func (g *Gauge) Set(value float64) { g.g.Set(value) }
// Add implements metrics.Gauge.
func (g *Gauge) Add(delta float64) { g.g.Add(delta) }
// Histogram is a Graphite histogram metric. Observations are bucketed into
// per-quantile gauges.
type Histogram struct {

View File

@@ -36,7 +36,7 @@ func TestGauge(t *testing.T) {
func TestHistogram(t *testing.T) {
// The histogram test is actually like 4 gauge tests.
prefix, name := "graphite.", "histogram_test"
prefix, name := "statsd.", "histogram_test"
label, value := "abc", "def" // ignored for Graphite
re50 := regexp.MustCompile(prefix + name + `.p50 ([0-9\.]+) [0-9]+`)
re90 := regexp.MustCompile(prefix + name + `.p90 ([0-9\.]+) [0-9]+`)