Improve prometheus plugin

closes #707
This commit is contained in:
Thibault Cohen
2016-03-01 11:12:23 -05:00
committed by Michele Fadda
parent 91166b4e01
commit 1fbee019fc
7 changed files with 452 additions and 46 deletions

View File

@@ -40,16 +40,6 @@ func TestPrometheusGeneratesMetrics(t *testing.T) {
err := p.Gather(&acc)
require.NoError(t, err)
expected := []struct {
name string
value float64
tags map[string]string
}{
{"prometheus_go_gc_duration_seconds_count", 7, map[string]string{}},
{"prometheus_go_goroutines", 15, map[string]string{}},
}
for _, e := range expected {
assert.True(t, acc.HasFloatField(e.name, "value"))
}
assert.True(t, acc.HasFloatField("go_gc_duration_seconds", "count"))
assert.True(t, acc.HasFloatField("go_goroutines", "gauge"))
}