-
Notifications
You must be signed in to change notification settings - Fork 366
Remove intermediary JSON conversion from generateFromCpuSamples
#9354
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
Conversation
generateFromCpuSamplesgenerateFromCpuSamples
|
Note: Added a benchmark test to try to measure performance gains. Unfortunately seems pretty minimal, but I do think the code is cleaner without this step. Benchmarks before this change: 29814.323529411766 Benchmarks after this change: 29160.1884057971 |
bkonyi
left a comment
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.
Nice! Thanks for fixing my questionable code 😉
Work towards #7917
Refactors
generateFromCpuSamplesto remove the intermediary JSON conversion step.Before this PR:
generateFromCpuSampleswent fromvm_service.CpuSamples-> serialized to JSON -> deserialized toCpuProfileData:With this PR:
generateFromCpuSamplesgoes fromvm_service.CpuSamples->CpuProfileDataNote: I filed #9353 to refactor this method more to avoid side-effects - the call to generate the stack frames creates the timeline tree and assigns frame IDs to every node in the tree. This was true before this change as well. However, I didn't want to change too much at once in this PR.