Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use proper count in copy progress message #497

Merged
merged 1 commit into from
Sep 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/common/mfu_flist_copy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1342,14 +1342,14 @@ static void create_progress_fn(const uint64_t* vals, int count, int complete, in

/* compute percentage of items created */
double percent = 0.0;
if (mkdir_total_count > 0) {
percent = (double)items * 100.0 / (double)mkdir_total_count;
if (mknod_total_count > 0) {
percent = (double)items * 100.0 / (double)mknod_total_count;
}

/* estimate seconds remaining */
double secs_remaining = -1.0;
if (item_rate > 0.0) {
secs_remaining = (double)(mkdir_total_count - items) / item_rate;
secs_remaining = (double)(mknod_total_count - items) / item_rate;
}

if (complete < ranks) {
Expand Down