-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
log/sdk: Add benchmarks #5054
Milestone
Comments
pellared
added
pkg:SDK
Related to an SDK package
area:logs
Part of OpenTelemetry logs
labels
Mar 13, 2024
2 tasks
pellared
added a commit
that referenced
this issue
Jun 3, 2024
Towards #5219 Towards #5054 This benchmarks are supposed - Validate the the `Processor` interface design from performance perspective. E.g. they are used to check if a processor that is modifying a log record is causing an additional heap allocations. - Benchmark the processors supported by the SDK. These are "almost-end-to-end" benchmarks (with noopExporter) so that it checks the performance of the SDK log processing without the actual exporting part. ``` cpu: Intel(R) Core(TM) i9-10885H CPU @ 2.40GHz BenchmarkProcessor/Simple-16 1990946 644.6 ns/op 417 B/op 1 allocs/op BenchmarkProcessor/Batch-16 835135 1211 ns/op 597 B/op 0 allocs/op BenchmarkProcessor/ModifyTimestampSimple-16 1782510 644.3 ns/op 417 B/op 1 allocs/op BenchmarkProcessor/ModifyTimestampBatch-16 945699 1222 ns/op 637 B/op 0 allocs/op BenchmarkProcessor/ModifyAttributesSimple-16 1570214 717.6 ns/op 465 B/op 2 allocs/op BenchmarkProcessor/ModifyAttributesBatch-16 768399 1383 ns/op 653 B/op 1 allocs/op ```
This was referenced Jun 26, 2024
pellared
pushed a commit
that referenced
this issue
Jun 27, 2024
This benchmark currently tests two rather different methods within the same loop, which makes it hard to see what could be causing a performance degradation. Related: #5054. ``` BenchmarkSetAddAttributes/SetAttributes-10 14066331 82.80 ns/op 48 B/op 1 allocs/op BenchmarkSetAddAttributes/AddAttributes-10 19333711 114.7 ns/op 0 B/op 0 allocs/op ```
pellared
pushed a commit
that referenced
this issue
Jun 27, 2024
This adds a benchmark for `record.WalkAttributes`. Part of #5054. ``` BenchmarkWalkAttributes/1_attributes-10 346989372 3.449 ns/op 0 B/op 0 allocs/op BenchmarkWalkAttributes/10_attributes-10 345712522 3.459 ns/op 0 B/op 0 allocs/op BenchmarkWalkAttributes/100_attributes-10 349380534 3.455 ns/op 0 B/op 0 allocs/op BenchmarkWalkAttributes/1000_attributes-10 342041373 3.484 ns/op 0 B/op 0 allocs/op ```
pellared
pushed a commit
that referenced
this issue
Jun 27, 2024
This adds a benchmark to create a logger from a logger provider. Related: #5054. ``` BenchmarkLoggerProviderLogger-10 3145390 548.8 ns/op 330 B/op 1 allocs/op ```
From SIG meeting: this looks almost complete. @dmathieu plans to another audit and review all coverage. |
From the public SDK methods, we are now benchmarking:
At this stage, all hot public APIs appear to be benchmarked in the log SDK. I believe this issue can be closed. |
We can always add more benchmarks later. Great job. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: