From c4e2dbedbb4b29824f7901fc4c480db834659a13 Mon Sep 17 00:00:00 2001 From: Noel Kwan Date: Wed, 23 Oct 2024 16:54:05 +0800 Subject: [PATCH] measure refill duration --- src/stream/src/executor/aggregation/minput.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/stream/src/executor/aggregation/minput.rs b/src/stream/src/executor/aggregation/minput.rs index 4405411867204..b128b9251a77f 100644 --- a/src/stream/src/executor/aggregation/minput.rs +++ b/src/stream/src/executor/aggregation/minput.rs @@ -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, Bound) = &(Bound::Unbounded, Bound::Unbounded); @@ -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());