Repository navigation
ui: Add self-time (aka self-duration) to slice aggregation - #2946
Conversation
Change-Id: Ie3500362519291ce741fd83f5905840775458631
|
🤖 Hi @stevegolton, I've received your request, and I'm working on it now! You can track my progress in the logs for more details. |
There was a problem hiding this comment.
📋 Review Summary
This pull request introduces a "self-duration" calculation for aggregated slice views. The implementation looks solid and correctly calculates self-time by subtracting the sum of child slice durations from the parent's duration.
🔍 General Feedback
- The use of a temporary table to pre-calculate child durations is a clean and efficient approach.
- The changes in
trace_processor_slice_track.tsto includeparent_idare straightforward and necessary for this feature. - I've added one minor comment regarding SQL formatting for consistency.
Overall, this is a great addition that will provide more detailed performance insights.
LalitMaganti
left a comment
There was a problem hiding this comment.
Awesome! So cool! LGTM :)
|
Can we also mark #1256 as fixed? |
|
Benchmarks seem to about double the time taken to calculate the aggregation (less the time taken to build the initial ii table). I'll take a look tomorrow to see if there are any improvements we can make before landing. Edit: With the ii table creation it seems to only take about 25% longer. I think this is probably worth it for the extra functionality. |
…3270) Since #2946, slice tracks must contain a `parent_id` column in order to be considered for slice aggregation, which rules out some of the slice-like plugin tracks that are generated from a query and don't necessarily have a parent_id in their data source or are tracks with no concept of a stack or depth. This patch relaxes the parent_id constraint, allowing tracks both with and without parent_id to be aggregated. Fixes https://buganizer.corp.google.com/issues/448068359
…3270) Since #2946, slice tracks must contain a `parent_id` column in order to be considered for slice aggregation, which rules out some of the slice-like plugin tracks that are generated from a query and don't necessarily have a parent_id in their data source or are tracks with no concept of a stack or depth. This patch relaxes the parent_id constraint, allowing tracks both with and without parent_id to be aggregated. Fixes https://buganizer.corp.google.com/issues/448068359
This patch adds a new column in the slice aggregation table for 'Self duration', which is the time a slice was running minus the total time any of its children were running.
Note: The additional column adds around 25% overhead to how long it takes to calculate the entire aggregation, which is reasonable considering the the extra functionality.