Fixing broken benchmark for mapper

Signed-off-by: Pedro Tanaka <pedro.stanaka@gmail.com>
This commit is contained in:
Pedro Tanaka 2022-06-17 12:11:00 +02:00
parent 0d22f85f04
commit 6e341dd805
No known key found for this signature in database
GPG key ID: D94A5D493246C196

View file

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