]> git.hungrycats.org Git - bees/commitdiff
progress: adjust minimum thresholds for ETA to 10 seconds and 1 GiB of data
authorZygo Blaxell <bees@furryterror.org>
Tue, 21 Jan 2025 03:48:25 +0000 (22:48 -0500)
committerZygo Blaxell <bees@furryterror.org>
Fri, 7 Feb 2025 03:42:15 +0000 (22:42 -0500)
1% is a lot of data on a petabyte filesystem, and a long time to wait for an
ETA.

After 1 GiB we should have some idea of how fast we're reading the data.
Increase the time to 10 seconds to avoid a nonsense result just after a scan
starts.

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

index f7857b6a099bdefc42073d3fa459ed71aa00fe4a..618e3e16f1a53abbee7b833562aeff7723752483 100644 (file)
@@ -1072,7 +1072,7 @@ BeesScanModeExtent::next_transid(const CrawlMap &crawl_map_unused)
                const bool finished = deferred_finished.second;
                if (finished) {
                        // eta_stamp = "idle";
-               } else if (time_so_far > 1 && bytenr_norm > 0.01) {
+               } else if (time_so_far > 10 && bytenr_offset > 1024 * 1024 * 1024) {
                        const time_t eta_duration = time_so_far / bytenr_norm;
                        const time_t eta_time = eta_duration + now;
                        eta_stamp = strf_localtime(eta_time);