-
Notifications
You must be signed in to change notification settings - Fork 452
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
Reduce cost of no attribute counters #1519
Reduce cost of no attribute counters #1519
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1519 +/- ##
=======================================
+ Coverage 62.4% 63.2% +0.8%
=======================================
Files 144 144
Lines 19891 20299 +408
=======================================
+ Hits 12426 12847 +421
+ Misses 7465 7452 -13 ☔ View full report in Codecov by Sentry. |
Consider a changelog entry, as users upgrading will learn about the perf improvement of zero-attributes, and can leverage it to achieve bound-instrument (not technically, but a reasonable workaround). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some nits, but overall looks very good.
Unit tests and changelog updated |
Fixes #
Design discussion issue (if applicable) #
Changes
This PR utilizes atomics to make counters fast when an empty set of attributes are passed in. This atomic bypasses the hashmap lookups and mutex locking.
Benchmarks
main
PR
Merge requirement checklist
CHANGELOG.md
files updated for non-trivial, user-facing changes