Skip to content

Commit 1fedb4e

Browse files
authored
Counting elapsed_compute in BoundedWindowAggExec (#14869)
1 parent 9285b84 commit 1fedb4e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

datafusion/physical-plan/src/windows/bounded_window_agg_exec.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -998,8 +998,13 @@ impl BoundedWindowAggStream {
998998
return Poll::Ready(None);
999999
}
10001000

1001+
let elapsed_compute = self.baseline_metrics.elapsed_compute().clone();
10011002
match ready!(self.input.poll_next_unpin(cx)) {
10021003
Some(Ok(batch)) => {
1004+
// Start the timer for compute time within this operator. It will be
1005+
// stopped when dropped.
1006+
let _timer = elapsed_compute.timer();
1007+
10031008
self.search_mode.update_partition_batch(
10041009
&mut self.input_buffer,
10051010
batch,
@@ -1013,6 +1018,8 @@ impl BoundedWindowAggStream {
10131018
}
10141019
Some(Err(e)) => Poll::Ready(Some(Err(e))),
10151020
None => {
1021+
let _timer = elapsed_compute.timer();
1022+
10161023
self.finished = true;
10171024
for (_, partition_batch_state) in self.partition_buffers.iter_mut() {
10181025
partition_batch_state.is_end = true;

0 commit comments

Comments
 (0)