Skip to content

Commit 12fad82

Browse files
committed
Add incremental load time data
1 parent eebb68d commit 12fad82

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

summarize/src/analysis.rs

+6
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ pub struct QueryData {
99
pub number_of_cache_misses: usize,
1010
pub number_of_cache_hits: usize,
1111
pub blocked_time: Duration,
12+
pub incremental_load_time: Duration,
1213
}
1314

1415
impl QueryData {
@@ -19,6 +20,7 @@ impl QueryData {
1920
number_of_cache_misses: 0,
2021
number_of_cache_hits: 0,
2122
blocked_time: Duration::from_nanos(0),
23+
incremental_load_time: Duration::from_nanos(0),
2224
}
2325
}
2426
}
@@ -108,6 +110,10 @@ pub fn perform_analysis(data: ProfilingData) -> Results {
108110
record_event_data(&event.label, &|data| {
109111
data.blocked_time += duration;
110112
});
113+
} else if &event.event_kind[..] == "IncrementalLoadResult" {
114+
record_event_data(&event.label, &|data| {
115+
data.incremental_load_time += duration;
116+
});
111117
}
112118
}
113119
}

summarize/src/main.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,17 @@ fn main() {
2121
results.query_data.sort_by(|l, r| r.self_time.cmp(&l.self_time));
2222

2323
println!("| Item | Self Time | % of total time | Number of invocations \
24-
| Cache hits | Blocked time |");
24+
| Cache hits | Blocked time | Incremental load time |");
2525

2626
for query_data in results.query_data {
2727
println!(
28-
"{} | {:?} | {} | {} | {:?} |",
28+
"| {} | {:?} | {} | {} | {:?} | {:?} |",
2929
query_data.label,
3030
query_data.self_time,
3131
query_data.number_of_cache_hits + query_data.number_of_cache_misses,
3232
query_data.number_of_cache_hits,
3333
query_data.blocked_time,
34+
query_data.incremental_load_time,
3435
);
3536
}
3637

0 commit comments

Comments
 (0)