From 6e341dd805a78af69963441888b00fb0e8d3089d Mon Sep 17 00:00:00 2001 From: Pedro Tanaka Date: Fri, 17 Jun 2022 12:11:00 +0200 Subject: [PATCH] Fixing broken benchmark for mapper Signed-off-by: Pedro Tanaka --- pkg/mapper/mapper_benchmark_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/mapper/mapper_benchmark_test.go b/pkg/mapper/mapper_benchmark_test.go index e8adeee..0a04944 100644 --- a/pkg/mapper/mapper_benchmark_test.go +++ b/pkg/mapper/mapper_benchmark_test.go @@ -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)