Skip to content

Commit a95e45f

Browse files
committed
[cmds] log the final stats for the db backup
1 parent 564b8f4 commit a95e45f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/sql_commands.cc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,15 @@ backup_user_db(const std::string& filename)
285285
loop_count += 1;
286286
}
287287

288+
{
289+
auto total = sqlite3_backup_pagecount(backup);
290+
auto complete = total - sqlite3_backup_remaining(backup);
291+
bguard.update(complete, total);
292+
}
288293
sqlite3_backup_finish(backup);
289-
log_info("backup complete");
294+
log_info("backup complete: complete=%llu; total=%llu",
295+
backup_progress_t::INSTANCE.bp_complete.load(),
296+
backup_progress_t::INSTANCE.bp_total.load());
290297
}
291298

292299
static Result<std::string, lnav::console::user_message>

0 commit comments

Comments
 (0)