From aa591e3e8e1594446728c0ea0f38079e4ea931e3 Mon Sep 17 00:00:00 2001 From: glightfoot Date: Wed, 17 Jun 2020 13:14:39 -0400 Subject: [PATCH] add test for signalfx/dogstatsd mixed tags Signed-off-by: glightfoot --- bridge_test.go | 5 +++++ line_benchmark_test.go | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bridge_test.go b/bridge_test.go index 3def37a..1ce8120 100644 --- a/bridge_test.go +++ b/bridge_test.go @@ -23,6 +23,7 @@ import ( "github.com/go-kit/kit/log" "github.com/prometheus/client_golang/prometheus" dto "github.com/prometheus/client_model/go" + "github.com/prometheus/statsd_exporter/pkg/clock" "github.com/prometheus/statsd_exporter/pkg/event" "github.com/prometheus/statsd_exporter/pkg/exporter" @@ -283,6 +284,10 @@ func TestHandlePacket(t *testing.T) { name: "librato/dogstatsd mixed tag styles without sampling", in: "foo#tag1=foo,tag3=bing:100|c|#tag1:bar,#tag2:baz", out: event.Events{}, + }, { + name: "signalfx/dogstatsd mixed tag styles without sampling", + in: "foo[tag1=foo,tag3=bing]:100|c|#tag1:bar,#tag2:baz", + out: event.Events{}, }, { name: "influxdb/dogstatsd mixed tag styles without sampling", in: "foo,tag1=foo,tag3=bing:100|c|#tag1:bar,#tag2:baz", diff --git a/line_benchmark_test.go b/line_benchmark_test.go index 26b3508..1c4dbae 100644 --- a/line_benchmark_test.go +++ b/line_benchmark_test.go @@ -38,7 +38,6 @@ func benchmarkLineToEvents(times int, b *testing.B) { logger := log.NewNopLogger() for n := 0; n < b.N; n++ { - for i := 0; i < times; i++ { for _, l := range input { line.LineToEvents(l, *sampleErrors, samplesReceived, tagErrors, tagsReceived, logger)