Skip to content

Commit

Permalink
Log a "Loading" progress message once per second
Browse files Browse the repository at this point in the history
  • Loading branch information
fdegros committed Apr 28, 2022
1 parent 6d5ff16 commit b5dc5a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class Beat {
using Duration = Clock::duration;

// Beat period.
const Duration period_ = std::chrono::milliseconds(100);
const Duration period_ = std::chrono::milliseconds(1000);

// Next beat time.
TimePoint next_ = Clock::now() + period_;
Expand Down
2 changes: 1 addition & 1 deletion lib/tree.cc
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ void Tree::BuildTree() {
// Add zip entries for all items except hardlinks
for (zip_int64_t id = 0; id < n; ++id) {
if (should_display_progress)
Log(LOG_DEBUG, "Indexing... ", 100 * id / n, "%");
Log(LOG_INFO, "Loading ", 100 * id / n, "%");

if (zip_stat_index(zip_, id, zipFlags, &sb) < 0)
throw ZipError(StrCat("Cannot read entry #", id), zip_);
Expand Down

0 comments on commit b5dc5a0

Please sign in to comment.