diff --git a/processor/deltatocumulativeprocessor/benchmark_test.go b/processor/deltatocumulativeprocessor/benchmark_test.go index f0ac5c987359..fd71734ddd39 100644 --- a/processor/deltatocumulativeprocessor/benchmark_test.go +++ b/processor/deltatocumulativeprocessor/benchmark_test.go @@ -22,7 +22,7 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/testing/sdktest" ) -var out consumertest.MetricsSink +var out *consumertest.MetricsSink func BenchmarkProcessor(gb *testing.B) { const ( @@ -145,6 +145,7 @@ func BenchmarkProcessor(gb *testing.B) { for _, cs := range cases { gb.Run(cs.name, func(b *testing.B) { st := setup(b, nil) + out = st.sink run(b, st.proc, cs) // verify all dps are processed without error diff --git a/processor/deltatocumulativeprocessor/internal/testing/sdktest/metrics.go b/processor/deltatocumulativeprocessor/internal/testing/sdktest/metrics.go index cf9ca23b317b..e2c5a77d293a 100644 --- a/processor/deltatocumulativeprocessor/internal/testing/sdktest/metrics.go +++ b/processor/deltatocumulativeprocessor/internal/testing/sdktest/metrics.go @@ -132,5 +132,5 @@ func Expect(metrics map[string]Metric) Spec { } metrics[name] = m } - return Spec(metrics) + return metrics }