Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore][exporter/elasticsearch] Add benchmark for logs consumer #33035

Merged
merged 6 commits into from
May 16, 2024

Conversation

lahsivjar
Copy link
Member

Description: Add a benchmark for elasticsearch exporter's LogsConsumer.

Link to tracking Issue: 32504

Testing: cd exporter/elasticsearchexporter/integrationtest && go test -bench=BenchmarkLogsExporter -run=^$ ./...

Documentation: N/A

@lahsivjar lahsivjar changed the title [exporter/elasticsearch] Add benchmark for logs consumer [chore][exporter/elasticsearch] Add benchmark for logs consumer May 14, 2024
Copy link
Contributor

@ycombinator ycombinator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor feedback but overall LGTM. Thanks for adding the benchmarking!

Copy link
Member

@andrzej-stencel andrzej-stencel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 Results from my laptop:

$ cd exporter/elasticsearchexporter/integrationtest
$ go test -v -bench=. -run=nothing
goos: linux
goarch: amd64
pkg: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter/integrationtest
cpu: 13th Gen Intel(R) Core(TM) i7-13700H
BenchmarkLogsExporter
BenchmarkLogsExporter/small_batch
BenchmarkLogsExporter/small_batch-20                8426            279010 ns/op           97037 B/op        791 allocs/op
BenchmarkLogsExporter/medium_batch
BenchmarkLogsExporter/medium_batch-20                340           2964026 ns/op          977727 B/op       7817 allocs/op
BenchmarkLogsExporter/large_batch
BenchmarkLogsExporter/large_batch-20                  56          32440576 ns/op         9704922 B/op      77806 allocs/op
BenchmarkLogsExporter/xlarge_batch
BenchmarkLogsExporter/xlarge_batch-20                  4         295870231 ns/op        95430408 B/op     771524 allocs/op
PASS
ok      github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter/integrationtest        11.359s

@andrzej-stencel andrzej-stencel merged commit 34a5a27 into open-telemetry:main May 16, 2024
162 checks passed
@github-actions github-actions bot added this to the next release milestone May 16, 2024
@lahsivjar lahsivjar deleted the benchmarks_32504_t2 branch May 16, 2024 11:21
andrzej-stencel pushed a commit that referenced this pull request May 22, 2024
…3087)

**Description:** Similar to
#33035
the PR adds benchmarks for `ConsumeTraces`.

The PR also updates the mock es receiver to handle `traces` properly in
order to have better readability of the tests/benchmarks and avoid
confusion with the special handling -- this is done by using separate
index configuration for traces and logs to distinguish the items in the
bulk indexer payload. The PR also adds an extra metric to the benchmarks
(`Consume{Traces, Logs}`) for reporting events consumed per second.
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->

**Link to tracking Issue:**
[32504](#32504)

**Testing:** `cd exporter/elasticsearchexporter/integrationtest && go
test -bench=BenchmarkExporter -run=^$ ./...`

**Documentation:** N/A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants