Skip to content

Commit 8cedb36

Browse files
committed
Update with feedback
1 parent bd9bda3 commit 8cedb36

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

summarize/src/analysis.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,16 @@ pub fn perform_analysis(data: ProfilingData) -> Results {
171171
record_event_data(
172172
&current_top.label,
173173
&|data| match &current_top.event_kind[..] {
174-
QUERY_EVENT_KIND
175-
| GENERIC_ACTIVITY_EVENT_KIND
176-
| INCREMENTAL_HASH_RESULT_EVENT_KIND => {
174+
QUERY_EVENT_KIND | GENERIC_ACTIVITY_EVENT_KIND => {
177175
data.self_time -= current_event_duration;
178176
}
177+
INCREMENTAL_RESULT_HASHING_EVENT_KIND => {
178+
// We are within hashing something. If we now encounter something
179+
// within that event (like the nested "intern-the-dep-node" event)
180+
// then we don't want to attribute that to the hashing time.
181+
data.self_time -= current_event_duration;
182+
data.incremental_hashing_time -= current_event_duration;
183+
}
179184
INCREMENTAL_LOAD_RESULT_EVENT_KIND => {
180185
data.self_time -= current_event_duration;
181186
data.incremental_load_time -= current_event_duration;

summarize/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ fn summarize(opt: SummarizeOpt) -> Result<(), Box<dyn Error + Send + Sync>> {
175175
//order the results by descending self time
176176
results
177177
.query_data
178-
.sort_by(|l, r| r.incremental_hashing_time.cmp(&l.incremental_hashing_time));
178+
.sort_by(|l, r| r.self_time.cmp(&l.self_time));
179179

180180
let mut table = Table::new();
181181

0 commit comments

Comments
 (0)