Skip to content

Commit

Permalink
[testbed] Add batcher performance tests
Browse files Browse the repository at this point in the history
  • Loading branch information
swiatekm committed Nov 13, 2024
1 parent b8437a0 commit c57c82c
Show file tree
Hide file tree
Showing 10 changed files with 319 additions and 9 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: []
3 changes: 2 additions & 1 deletion cmd/oteltestbedcol/builder-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ processors:
- gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.113.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.113.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.113.0

- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.113.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.113.0
receivers:
- gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.113.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver v0.113.0
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 @@ -55,6 +55,7 @@ type BaseOTLPDataReceiver struct {
compression string
retry string
sendingQueue string
batcher string
}

func (bor *BaseOTLPDataReceiver) Start(tc consumer.Traces, mc consumer.Metrics, lc consumer.Logs) error {
Expand Down Expand Up @@ -98,6 +99,11 @@ func (bor *BaseOTLPDataReceiver) WithQueue(sendingQueue string) *BaseOTLPDataRec
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 @@ -118,8 +124,9 @@ func (bor *BaseOTLPDataReceiver) GenConfigYAMLStr() string {
endpoint: "%s"
%s
%s
%s
tls:
insecure: true`, bor.exporterType, addr, bor.retry, bor.sendingQueue)
insecure: true`, bor.exporterType, addr, bor.retry, bor.sendingQueue, bor.batcher)
comp := "none"
if bor.compression != "" {
comp = bor.compression
Expand Down
Loading

0 comments on commit c57c82c

Please sign in to comment.