-
Couldn't load subscription status.
- Fork 467
perf(profiling): try to intern strings/functions #15062
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?
perf(profiling): try to intern strings/functions #15062
Conversation
|
|
f806eda to
ff3a20e
Compare
Bootstrap import analysisComparison of import times between this PR and base. SummaryThe average import time from this PR is: 238 ± 4 ms. The average import time from base is: 239 ± 3 ms. The import time difference between this PR and base is: -1.7 ± 0.2 ms. Import time breakdownThe following import paths have shrunk:
|
ff3a20e to
f598d1c
Compare
| const std::lock_guard<std::mutex> lock(profile_mtx); | ||
| auto res = ddog_prof_Profile_add(&cur_profile, sample, endtime_ns); | ||
|
|
||
| auto set_dictionary_res = ddog_prof_Profile_set_profiles_dictionary(&cur_profile, get_dictionary()); |
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.
The ddog_prof_Profile_set_profiles_dictionary function is going to reset some internal tables every time this is called. This should be moved to wherever you create a new profile.
/// Sets the profiles dictionary to enable `api2` operations.
pub fn set_profiles_dictionary(
&mut self,
profiles_dictionary: crate::profiles::collections::Arc<ProfilesDictionary>,
) {
self.profiles_dictionary_translator = Some(ProfilesDictionaryTranslator {
profiles_dictionary,
mappings: Default::default(),
functions: Default::default(),
strings: Default::default(),
});
}f598d1c to
5d18e55
Compare
5d18e55 to
6a5faa0
Compare
Description
Testing
Risks
Additional Notes