1
0
mirror of https://github.com/Zygo/bees.git synced 2025-05-17 13:25:45 +02:00

progress: adjust minimum thresholds for ETA to 10 seconds and 1 GiB of data

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>
This commit is contained in:
Zygo Blaxell 2025-01-20 22:48:25 -05:00
parent 85aba7b695
commit 48b7fbda9c

View File

@ -1072,7 +1072,7 @@ BeesScanModeExtent::next_transid(const CrawlMap &crawl_map_unused)
const bool finished = deferred_finished.second; const bool finished = deferred_finished.second;
if (finished) { if (finished) {
// eta_stamp = "idle"; // 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_duration = time_so_far / bytenr_norm;
const time_t eta_time = eta_duration + now; const time_t eta_time = eta_duration + now;
eta_stamp = strf_localtime(eta_time); eta_stamp = strf_localtime(eta_time);