Merge pull request #441 from pedro-stanaka/fix/benchmarks-mapper

Fixing broken benchmark for mapper
This commit is contained in:
Matthias Rampke 2022-06-18 10:17:07 +02:00 committed by GitHub
commit d90c8ff92d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,6 +18,8 @@ import (
"math/rand"
"testing"
"github.com/go-kit/log"
"github.com/prometheus/statsd_exporter/pkg/mappercache/lru"
"github.com/prometheus/statsd_exporter/pkg/mappercache/randomreplacement"
)
@ -242,7 +244,9 @@ mappings:
"foo.bar.baz",
}
mapper := MetricMapper{}
mapper := MetricMapper{
Logger: log.NewNopLogger(),
}
err := mapper.InitFromYAMLString(config)
if err != nil {
b.Fatalf("Config load error: %s %s", config, err)