Skip to content

Commit

Permalink
Fix dodgy merge
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Wakely <[email protected]>
  • Loading branch information
StephenWakely committed Nov 28, 2024
1 parent 872a4df commit a11f591
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
8 changes: 4 additions & 4 deletions pkg/aggregator/check_sampler_bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ import (
log "github.com/DataDog/datadog-agent/comp/core/log/def"
"github.com/DataDog/datadog-agent/comp/core/tagger/mock"
"github.com/DataDog/datadog-agent/comp/forwarder/defaultforwarder"
eventplatformock "github.com/DataDog/datadog-agent/comp/forwarder/eventplatform/mock"
"github.com/DataDog/datadog-agent/comp/forwarder/eventplatform"
"github.com/DataDog/datadog-agent/comp/forwarder/eventplatform/eventplatformimpl"
haagentmock "github.com/DataDog/datadog-agent/comp/haagent/mock"

//nolint:revive // TODO(AML) Fix revive linter
"github.com/DataDog/datadog-agent/comp/core/config"
forwarder "github.com/DataDog/datadog-agent/comp/forwarder/defaultforwarder"
"github.com/DataDog/datadog-agent/comp/forwarder/defaultforwarder/resolver"
compression "github.com/DataDog/datadog-agent/comp/serializer/compression/def"
Expand All @@ -38,7 +38,6 @@ type benchmarkDeps struct {
Log log.Component
Hostname hostname.Component
Compressor compression.Component
Config config.Component
}

func benchmarkAddBucket(bucketValue int64, b *testing.B) {
Expand All @@ -53,8 +52,9 @@ func benchmarkAddBucket(bucketValue int64, b *testing.B) {
options.DontStartForwarders = true
sharedForwarder := forwarder.NewDefaultForwarder(pkgconfigsetup.Datadog(), deps.Log, forwarderOpts)
orchestratorForwarder := optional.NewOption[defaultforwarder.Forwarder](defaultforwarder.NoopForwarder{})
eventPlatformForwarder := optional.NewOptionPtr[eventplatform.Forwarder](eventplatformimpl.NewNoopEventPlatformForwarder(deps.Hostname))
haAgent := haagentmock.NewMockHaAgent()
demux := InitAndStartAgentDemultiplexer(deps.Log, sharedForwarder, &orchestratorForwarder, options, eventplatformock.NewMock(), haAgent, deps.Compressor, taggerComponent, "hostname")
demux := InitAndStartAgentDemultiplexer(deps.Log, sharedForwarder, &orchestratorForwarder, options, eventPlatformForwarder, haAgent, deps.Compressor, taggerComponent, "hostname")
defer demux.Stop(true)

checkSampler := newCheckSampler(1, true, true, 1000, tags.NewStore(true, "bench"), checkid.ID("hello:world:1234"), taggerComponent)
Expand Down
8 changes: 3 additions & 5 deletions pkg/aggregator/demultiplexer_agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ func TestDemuxNoAggOptionEnabled(t *testing.T) {
mockSerializer.On("AreSketchesEnabled").Return(true)
opts.EnableNoAggregationPipeline = true
deps := createDemultiplexerAgentTestDeps(t)

demux := initAgentDemultiplexer(deps.Log, NewForwarderTest(deps.Log), deps.OrchestratorFwd, opts, deps.EventPlatform, deps.HaAgent, deps.Compressor, deps.Tagger, "")
demux.statsd.noAggStreamWorker.serializer = mockSerializer // the no agg pipeline will use our mocked serializer

Expand Down Expand Up @@ -158,10 +157,9 @@ type DemultiplexerAgentTestDeps struct {
TestDeps
OrchestratorFwd orchestratorforwarder.Component
EventPlatform eventplatform.Component
// just changed from factory to component. Do we need both?
Compressor compression.Component
Tagger tagger.Component
HaAgent haagent.Component
Compressor compression.Component
Tagger tagger.Component
HaAgent haagent.Component
}

func createDemultiplexerAgentTestDeps(t *testing.T) DemultiplexerAgentTestDeps {
Expand Down

0 comments on commit a11f591

Please sign in to comment.