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

Predefine Vector Capacity for LogRecord Attributes #1908

Merged
merged 7 commits into from
Jul 3, 2024

Conversation

lalitb
Copy link
Member

@lalitb lalitb commented Jul 3, 2024

Fixes #1896

Stress test

Before:
Throughput: 57,703,000 iterations/sec
Memory usage: 3.70 MB
CPU usage: 99.87512%
Virtual memory usage: 2249.05 MB

With PR:
Throughput: 70,031,600 iterations/sec
Memory usage: 3.98 MB
CPU usage: 100%
Virtual memory usage: 2249.05 MB

Please provide a brief description of the changes here.

Merge requirement checklist

  • CONTRIBUTING guidelines followed
  • Unit tests added/updated (if applicable)
  • Appropriate CHANGELOG.md files updated for non-trivial, user-facing changes
  • Changes in public API reviewed (if applicable)

@lalitb lalitb requested a review from a team as a code owner July 3, 2024 00:52
Copy link

codecov bot commented Jul 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.0%. Comparing base (ad990d6) to head (27ea8c5).

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #1908   +/-   ##
=====================================
  Coverage   75.0%   75.0%           
=====================================
  Files        122     122           
  Lines      20285   20289    +4     
=====================================
+ Hits       15218   15221    +3     
- Misses      5067    5068    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -10,7 +10,7 @@
| noop_layer_disabled | 12 ns |
| noop_layer_enabled | 25 ns |
| ot_layer_disabled | 19 ns |
| ot_layer_enabled | 371 ns |
| ot_layer_enabled | 270 ns |
Copy link
Member

Choose a reason for hiding this comment

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

❤️ this! Could you update stress tests too?

Copy link
Member Author

Choose a reason for hiding this comment

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

updated stress. The benchmark shows improvement from 391 ns -> 305 ns. Updated that too.

@cijothomas cijothomas merged commit ae6e2ff into open-telemetry:main Jul 3, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LogRecord Attributes - preallocate attributes vec?
4 participants