Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ func TestDetectResource_Parallel(t *testing.T) {
// call p.Get multiple times
wg := &sync.WaitGroup{}
wg.Add(iterations)
for i := 0; i < iterations; i++ {
for range iterations {
go func() {
defer wg.Done()
detected, _, err := p.Get(t.Context(), &http.Client{Timeout: 10 * time.Second})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,7 @@ func benchmarkConsumeTraces(b *testing.B, cfg *Config) {
sink := new(consumertest.TracesSink)
processor, _ := factory.CreateTraces(b.Context(), processortest.NewNopSettings(metadata.Type), cfg, sink)

b.ResetTimer()
for n := 0; n < b.N; n++ {
for b.Loop() {
// TODO use testbed.PerfTestDataProvider here once that includes resources
assert.NoError(b, processor.ConsumeTraces(b.Context(), ptrace.NewTraces()))
}
Expand All @@ -324,8 +323,7 @@ func benchmarkConsumeMetrics(b *testing.B, cfg *Config) {
sink := new(consumertest.MetricsSink)
processor, _ := factory.CreateMetrics(b.Context(), processortest.NewNopSettings(metadata.Type), cfg, sink)

b.ResetTimer()
for n := 0; n < b.N; n++ {
for b.Loop() {
// TODO use testbed.PerfTestDataProvider here once that includes resources
assert.NoError(b, processor.ConsumeMetrics(b.Context(), pmetric.NewMetrics()))
}
Expand All @@ -346,8 +344,7 @@ func benchmarkConsumeLogs(b *testing.B, cfg *Config) {
sink := new(consumertest.LogsSink)
processor, _ := factory.CreateLogs(b.Context(), processortest.NewNopSettings(metadata.Type), cfg, sink)

b.ResetTimer()
for n := 0; n < b.N; n++ {
for b.Loop() {
// TODO use testbed.PerfTestDataProvider here once that includes resources
assert.NoError(b, processor.ConsumeLogs(b.Context(), plog.NewLogs()))
}
Expand All @@ -368,8 +365,7 @@ func benchmarkConsumeProfiles(b *testing.B, cfg *Config) {
sink := new(consumertest.ProfilesSink)
processor, _ := factory.(xprocessor.Factory).CreateProfiles(b.Context(), processortest.NewNopSettings(metadata.Type), cfg, sink)

b.ResetTimer()
for n := 0; n < b.N; n++ {
for b.Loop() {
// TODO use testbed.PerfTestDataProvider here once that includes resources
assert.NoError(b, processor.ConsumeProfiles(b.Context(), pprofile.NewProfiles()))
}
Expand Down
Loading