[SDK] perf: avoid temp allocation for offer measurement - #4475
Open
proost wants to merge 5 commits into
Open
Conversation
…y-cpp into perf-avoid-temp-allocation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4475 +/- ##
==========================================
- Coverage 82.67% 82.62% -0.05%
==========================================
Files 516 516
Lines 20197 20225 +28
==========================================
+ Hits 16696 16708 +12
- Misses 3501 3517 +16
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Purpose: Avoid constructing unnecessary MetricAttributes from KeyValueIterable.
Current implementation temporary allocation happens from KeyValueIterable to MetricAttributes. Problem is that offering measurement can be rejected. So temporary allocation can be just useless overhead.
So this improvements can be beneficial under below circumstances:
main branch:
this PR:
Diffs:
If community think this optimization is too narrow a range, i will close it.
CHANGELOG.mdupdated for non-trivial changes