Skip to content

opentelemetry-sdk: remove generator in the accessor for links/events#5287

Merged
lzchen merged 4 commits into
open-telemetry:mainfrom
codeboten:codeboten/rm-generator
Jun 11, 2026
Merged

opentelemetry-sdk: remove generator in the accessor for links/events#5287
lzchen merged 4 commits into
open-telemetry:mainfrom
codeboten:codeboten/rm-generator

Conversation

@codeboten

@codeboten codeboten commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Description

A small performance improvement that doesn't impact anything else.

Type of change

Please delete options that are not relevant.

  • Small improvement

How Has This Been Tested?

The results from running the trace benchmarks with the added tests show a median improvement over 10 runs:

Test Before (ns) After (ns) Improvement
test_read_events[1] 6,351.2 6,029.5 +5.1%
test_read_events[10] 17,303.1 16,521.3 +4.5%
test_read_events[50] 64,633.7 61,815.9 +4.4%
test_read_events[128] 155,636.7 149,841.7 +3.7%
test_read_links[1] 5,866.8 5,464.1 +6.9%
test_read_links[10] 12,995.7 12,350.7 +5.0%
test_read_links[50] 43,593.6 42,135.1 +3.3%
test_read_links[128] 106,932.7 99,705.2 +6.8%

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Benchmark tests have been added

A small performance improvement that doesn't impact anything else. The results from running the trace benchmarks with the added tests show a median improvement over 10 runs:

```
| Test | Before (ns) | After (ns) | Improvement |
|---|---|---|---|
| `test_read_events[1]` | 6,351.2 | 6,029.5 | +5.1% |
| `test_read_events[10]` | 17,303.1 | 16,521.3 | +4.5% |
| `test_read_events[50]` | 64,633.7 | 61,815.9 | +4.4% |
| `test_read_events[128]` | 155,636.7 | 149,841.7 | +3.7% |
| `test_read_links[1]` | 5,866.8 | 5,464.1 | +6.9% |
| `test_read_links[10]` | 12,995.7 | 12,350.7 | +5.0% |
| `test_read_links[50]` | 43,593.6 | 42,135.1 | +3.3% |
| `test_read_links[128]` | 106,932.7 | 99,705.2 | +6.8% |
```

Signed-off-by: Alex Boten <[email protected]>
@codeboten
codeboten requested a review from a team as a code owner June 10, 2026 20:09
Signed-off-by: Alex Boten <[email protected]>

@MikeGoldsmith MikeGoldsmith left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Amazing - thanks @codeboten!

@lzchen
lzchen added this pull request to the merge queue Jun 11, 2026
Merged via the queue into open-telemetry:main with commit d840c3b Jun 11, 2026
479 checks passed
@github-project-automation github-project-automation Bot moved this from Approved PRs to Done in Python PR digest Jun 11, 2026
@codeboten
codeboten deleted the codeboten/rm-generator branch June 11, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants