]> git.hungrycats.org Git - bees/commitdiff
context: report time in scan_one_extent
authorZygo Blaxell <bees@furryterror.org>
Mon, 30 Dec 2024 20:07:57 +0000 (15:07 -0500)
committerZygo Blaxell <bees@furryterror.org>
Sat, 4 Jan 2025 04:36:53 +0000 (23:36 -0500)
Add yet another field to the scan/skip report line:  the wallclock
time used to process the extent ref.

Signed-off-by: Zygo Blaxell <bees@furryterror.org>
src/bees-context.cc

index da7ae71dea4446a76ccedc2c9b51db75a900d288..6d484a513064da051700f953ff9d92c7211becbe 100644 (file)
@@ -358,6 +358,8 @@ BeesContext::scan_one_extent(const BeesFileRange &bfr, const Extent &e)
        BEESTRACE("scan bfr " << bfr);
        BEESCOUNT(scan_extent);
 
+       Timer one_timer;
+
        // We keep moving this method around
        auto m_ctx = shared_from_this();
 
@@ -854,7 +856,8 @@ BeesContext::scan_one_extent(const BeesFileRange &bfr, const Extent &e)
                        << pretty(e.size()) << " "
                        << dedupe_list.size() << "d" << copy_list.size() << "c"
                        << ((bytes_zeroed + BLOCK_SIZE_SUMS - 1) / BLOCK_SIZE_SUMS) << "p"
-                       << (extent_compressed ? "z {" : " {")
+                       << (extent_compressed ? "z " : " ")
+                       << one_timer << "s {"
                        << to_hex(e.bytenr()) << "+" << to_hex(e.offset()) << "} "
                        << to_hex(e.begin()) << " [" << bar << "] " << to_hex(e.end())
                        << ' ' << name_fd(bfr.fd())