Skip to content

Commit

Permalink
Lift timing out of hot loop
Browse files Browse the repository at this point in the history
  • Loading branch information
tustvold committed Sep 8, 2022
1 parent 0ddcc50 commit 8143bb9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions datafusion/core/src/physical_plan/sorts/sort_preserving_merge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -545,12 +545,12 @@ impl SortPreservingMergeStream {
}
}

loop {
// NB timer records time taken on drop, so there are no
// calls to `timer.done()` below.
let elapsed_compute = self.tracking_metrics.elapsed_compute().clone();
let _timer = elapsed_compute.timer();
// NB timer records time taken on drop, so there are no
// calls to `timer.done()` below.
let elapsed_compute = self.tracking_metrics.elapsed_compute().clone();
let _timer = elapsed_compute.timer();

loop {
match self.heap.pop() {
Some(Reverse(mut cursor)) => {
let stream_idx = cursor.stream_idx();
Expand Down

0 comments on commit 8143bb9

Please sign in to comment.