-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Introduce MergeTo method for profiles #14091
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #14091 +/- ##
==========================================
+ Coverage 92.14% 92.20% +0.06%
==========================================
Files 666 667 +1
Lines 41438 41451 +13
==========================================
+ Hits 38181 38218 +37
+ Misses 2217 2205 -12
+ Partials 1040 1028 -12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
|
This can be rebased against the main branch. |
pdata/pprofile/profiles_merge.go
Outdated
| tmp := NewProfiles() | ||
| ms.CopyTo(tmp) | ||
|
|
||
| tmpDstDict := NewProfilesDictionary() |
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.
Why the need to create a new dictionary? That adds an allocation we likely don't need.
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.
I don't remember why I implemented on this way (long time ago). But you are totally right.
Thanks!
| Samples().AppendEmpty() | ||
| sample.SetLinkIndex(1) | ||
|
|
||
| require.NoError(t, src.MergeTo(dest)) |
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.
This test re-tests a lot of the switchDictionary code. Couldn't we simplify that?
Signed-off-by: Israel Blancas <[email protected]>
Continuation #13106
Profiles.MergeToimplementation that merges one profile message into another while reconciling their dictionaries and appendingresource profiles.