Implement binned counts for polling metrics

This commit is contained in:
Cecylia Bocovich 2021-03-31 10:52:01 -04:00
parent 83ef0b6f6d
commit 92bd900bc5
4 changed files with 108 additions and 23 deletions

View file

@ -26,8 +26,6 @@ var promOnce sync.Once
func TestBroker(t *testing.T) {
promOnce.Do(InitPrometheus)
Convey("Context", t, func() {
ctx := NewBrokerContext(NullLogger())
@ -303,8 +301,6 @@ func TestBroker(t *testing.T) {
}
func TestSnowflakeHeap(t *testing.T) {
promOnce.Do(InitPrometheus)
Convey("SnowflakeHeap", t, func() {
h := new(SnowflakeHeap)
heap.Init(h)
@ -348,8 +344,6 @@ func TestSnowflakeHeap(t *testing.T) {
}
func TestGeoip(t *testing.T) {
promOnce.Do(InitPrometheus)
Convey("Geoip", t, func() {
tv4 := new(GeoIPv4Table)
err := GeoIPLoadFile(tv4, "test_geoip")
@ -454,8 +448,6 @@ func TestGeoip(t *testing.T) {
}
func TestMetrics(t *testing.T) {
promOnce.Do(InitPrometheus)
Convey("Test metrics...", t, func() {
done := make(chan bool)
buf := new(bytes.Buffer)