Skip to content

Commit

Permalink
measure refill duration
Browse files Browse the repository at this point in the history
  • Loading branch information
kwannoel committed Oct 23, 2024
1 parent fd975e0 commit c4e2dbe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/stream/src/executor/aggregation/minput.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ impl MaterializedInputState {
if !self.cache.is_synced() {
stats.agg_state_cache_miss_count += 1;

// Measure how long it takes to refill the cache
let start = std::time::Instant::now();
let mut cache_filler = self.cache.begin_syncing();
let sub_range: &(Bound<OwnedRow>, Bound<OwnedRow>) =
&(Bound::Unbounded, Bound::Unbounded);
Expand Down Expand Up @@ -226,6 +228,8 @@ impl MaterializedInputState {
cache_filler.append(cache_key, cache_value);
}
cache_filler.finish();

let duration = start.elapsed().as_secs();
}
assert!(self.cache.is_synced());

Expand Down

0 comments on commit c4e2dbe

Please sign in to comment.