Skip to content

Commit

Permalink
[testbed] Add batcher performance tests (#36206)
Browse files Browse the repository at this point in the history
  • Loading branch information
swiatekm authored Dec 6, 2024
1 parent 7ca07d5 commit 64384a0
Show file tree
Hide file tree
Showing 10 changed files with 322 additions and 7 deletions.
27 changes: 27 additions & 0 deletions .chloggen/test_testbed-batcher.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: testbed

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Add batcher performance tests

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [36206]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:

# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: []
4 changes: 4 additions & 0 deletions cmd/oteltestbedcol/builder-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ processors:
- gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.115.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.115.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.115.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.115.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.115.0

receivers:
- gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.115.0
Expand Down Expand Up @@ -100,6 +102,8 @@ replaces:
- github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter => ../../exporter/sapmexporter
- github.com/open-telemetry/opentelemetry-collector-contrib/receiver/syslogreceiver => ../../receiver/syslogreceiver
- github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor => ../../processor/resourceprocessor
- github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor => ../../processor/transformprocessor
- github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor => ../../processor/filterprocessor
- github.com/open-telemetry/opentelemetry-collector-contrib/exporter/carbonexporter => ../../exporter/carbonexporter
- github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus => ../../pkg/translator/prometheus
- github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden => ../../pkg/golden
Expand Down
4 changes: 4 additions & 0 deletions testbed/stabilitytests/metric_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ func TestStabilityMetricsOTLP(t *testing.T) {
contribPerfResultsSummary,
nil,
nil,
nil,
)
}

Expand All @@ -42,6 +43,7 @@ func TestStabilityMetricsOpenCensus(t *testing.T) {
contribPerfResultsSummary,
nil,
nil,
nil,
)
}

Expand All @@ -58,6 +60,7 @@ func TestStabilityMetricsCarbon(t *testing.T) {
contribPerfResultsSummary,
nil,
nil,
nil,
)
}

Expand All @@ -74,5 +77,6 @@ func TestStabilityMetricsSignalFx(t *testing.T) {
contribPerfResultsSummary,
nil,
nil,
nil,
)
}
6 changes: 6 additions & 0 deletions testbed/stabilitytests/trace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ func TestStabilityTracesOpenCensus(t *testing.T) {
contribPerfResultsSummary,
processorsConfig,
nil,
nil,
)
}

Expand All @@ -68,6 +69,7 @@ func TestStabilityTracesSAPM(t *testing.T) {
contribPerfResultsSummary,
processorsConfig,
nil,
nil,
)
}

Expand All @@ -84,6 +86,7 @@ func TestStabilityTracesOTLP(t *testing.T) {
contribPerfResultsSummary,
processorsConfig,
nil,
nil,
)
}

Expand All @@ -100,6 +103,7 @@ func TestStabilityTracesJaegerGRPC(t *testing.T) {
contribPerfResultsSummary,
processorsConfig,
nil,
nil,
)
}

Expand All @@ -116,6 +120,7 @@ func TestStabilityTracesZipkin(t *testing.T) {
contribPerfResultsSummary,
processorsConfig,
nil,
nil,
)
}

Expand All @@ -132,5 +137,6 @@ func TestStabilityTracesDatadog(t *testing.T) {
contribPerfResultsSummary,
processorsConfig,
nil,
nil,
)
}
9 changes: 8 additions & 1 deletion testbed/testbed/receivers.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ type BaseOTLPDataReceiver struct {
retry string
sendingQueue string
timeout string
batcher string
}

func (bor *BaseOTLPDataReceiver) Start(tc consumer.Traces, mc consumer.Metrics, lc consumer.Logs) error {
Expand Down Expand Up @@ -104,6 +105,11 @@ func (bor *BaseOTLPDataReceiver) WithTimeout(timeout string) *BaseOTLPDataReceiv
return bor
}

func (bor *BaseOTLPDataReceiver) WithBatcher(batcher string) *BaseOTLPDataReceiver {
bor.batcher = batcher
return bor
}

func (bor *BaseOTLPDataReceiver) Stop() error {
// we reuse the receiver across signals. Shutting down the log receiver shuts down the metrics and traces receiver.
return bor.logReceiver.Shutdown(context.Background())
Expand All @@ -125,8 +131,9 @@ func (bor *BaseOTLPDataReceiver) GenConfigYAMLStr() string {
%s
%s
%s
%s
tls:
insecure: true`, bor.exporterType, addr, bor.retry, bor.sendingQueue, bor.timeout)
insecure: true`, bor.exporterType, addr, bor.retry, bor.sendingQueue, bor.timeout, bor.batcher)
comp := "none"
if bor.compression != "" {
comp = bor.compression
Expand Down
Loading

0 comments on commit 64384a0

Please sign in to comment.