From 737b8868e489d6af92e7207142c4b412a486e252 Mon Sep 17 00:00:00 2001 From: Marcus Holland-Moritz Date: Sun, 17 Dec 2023 22:22:12 +0100 Subject: [PATCH] fix(scanner): ordering CPU time was wrong due to wrong waiting order --- src/dwarfs/scanner.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dwarfs/scanner.cpp b/src/dwarfs/scanner.cpp index a91faef92..877f704dc 100644 --- a/src/dwarfs/scanner.cpp +++ b/src/dwarfs/scanner.cpp @@ -749,13 +749,14 @@ void scanner_::scan( LOG_INFO << "waiting for segmenting/blockifying to finish..."; + // We must wait for blockify first, since the blockify jobs are what + // trigger the ordering jobs. + wg_blockify.wait(); wg_ordering.wait(); LOG_INFO << "total ordering CPU time: " << time_with_unit(wg_ordering.get_cpu_time()); - wg_blockify.wait(); - LOG_INFO << "total segmenting CPU time: " << time_with_unit(wg_blockify.get_cpu_time()); }