Skip to content

Commit c57c82c

Browse files
committed
[testbed] Add batcher performance tests
1 parent b8437a0 commit c57c82c

File tree

10 files changed

+319
-9
lines changed

10 files changed

+319
-9
lines changed

.chloggen/test_testbed-batcher.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: enhancement
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
7+
component: testbed
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: Add batcher performance tests
11+
12+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13+
issues: [36206]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext:
19+
20+
# If your change doesn't affect end users or the exported elements of any package,
21+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
22+
# Optional: The change log or logs in which this entry should be included.
23+
# e.g. '[user]' or '[user, api]'
24+
# Include 'user' if the change is relevant to end users.
25+
# Include 'api' if there is a change to a library API.
26+
# Default: '[user]'
27+
change_logs: []

cmd/oteltestbedcol/builder-config.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ processors:
3333
- gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.113.0
3434
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.113.0
3535
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.113.0
36-
36+
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.113.0
37+
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.113.0
3738
receivers:
3839
- gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.113.0
3940
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver v0.113.0

testbed/stabilitytests/metric_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ func TestStabilityMetricsOTLP(t *testing.T) {
2626
contribPerfResultsSummary,
2727
nil,
2828
nil,
29+
nil,
2930
)
3031
}
3132

@@ -42,6 +43,7 @@ func TestStabilityMetricsOpenCensus(t *testing.T) {
4243
contribPerfResultsSummary,
4344
nil,
4445
nil,
46+
nil,
4547
)
4648
}
4749

@@ -58,6 +60,7 @@ func TestStabilityMetricsCarbon(t *testing.T) {
5860
contribPerfResultsSummary,
5961
nil,
6062
nil,
63+
nil,
6164
)
6265
}
6366

@@ -74,5 +77,6 @@ func TestStabilityMetricsSignalFx(t *testing.T) {
7477
contribPerfResultsSummary,
7578
nil,
7679
nil,
80+
nil,
7781
)
7882
}

testbed/stabilitytests/trace_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ func TestStabilityTracesOpenCensus(t *testing.T) {
5252
contribPerfResultsSummary,
5353
processorsConfig,
5454
nil,
55+
nil,
5556
)
5657
}
5758

@@ -68,6 +69,7 @@ func TestStabilityTracesSAPM(t *testing.T) {
6869
contribPerfResultsSummary,
6970
processorsConfig,
7071
nil,
72+
nil,
7173
)
7274
}
7375

@@ -84,6 +86,7 @@ func TestStabilityTracesOTLP(t *testing.T) {
8486
contribPerfResultsSummary,
8587
processorsConfig,
8688
nil,
89+
nil,
8790
)
8891
}
8992

@@ -100,6 +103,7 @@ func TestStabilityTracesJaegerGRPC(t *testing.T) {
100103
contribPerfResultsSummary,
101104
processorsConfig,
102105
nil,
106+
nil,
103107
)
104108
}
105109

@@ -116,6 +120,7 @@ func TestStabilityTracesZipkin(t *testing.T) {
116120
contribPerfResultsSummary,
117121
processorsConfig,
118122
nil,
123+
nil,
119124
)
120125
}
121126

@@ -132,5 +137,6 @@ func TestStabilityTracesDatadog(t *testing.T) {
132137
contribPerfResultsSummary,
133138
processorsConfig,
134139
nil,
140+
nil,
135141
)
136142
}

testbed/testbed/receivers.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ type BaseOTLPDataReceiver struct {
5555
compression string
5656
retry string
5757
sendingQueue string
58+
batcher string
5859
}
5960

6061
func (bor *BaseOTLPDataReceiver) Start(tc consumer.Traces, mc consumer.Metrics, lc consumer.Logs) error {
@@ -98,6 +99,11 @@ func (bor *BaseOTLPDataReceiver) WithQueue(sendingQueue string) *BaseOTLPDataRec
9899
return bor
99100
}
100101

102+
func (bor *BaseOTLPDataReceiver) WithBatcher(batcher string) *BaseOTLPDataReceiver {
103+
bor.batcher = batcher
104+
return bor
105+
}
106+
101107
func (bor *BaseOTLPDataReceiver) Stop() error {
102108
// we reuse the receiver across signals. Shutting down the log receiver shuts down the metrics and traces receiver.
103109
return bor.logReceiver.Shutdown(context.Background())
@@ -118,8 +124,9 @@ func (bor *BaseOTLPDataReceiver) GenConfigYAMLStr() string {
118124
endpoint: "%s"
119125
%s
120126
%s
127+
%s
121128
tls:
122-
insecure: true`, bor.exporterType, addr, bor.retry, bor.sendingQueue)
129+
insecure: true`, bor.exporterType, addr, bor.retry, bor.sendingQueue, bor.batcher)
123130
comp := "none"
124131
if bor.compression != "" {
125132
comp = bor.compression

0 commit comments

Comments
 (0)