Skip to content

Commit

Permalink
repl: Report total number of objs replicated
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony Edgin committed Sep 16, 2024
1 parent 028e57d commit 3cbaee4
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions repl
Original file line number Diff line number Diff line change
Expand Up @@ -272,12 +272,16 @@ replicate() {
return 0
fi

local totRepl
if (( maxTransThreads > 0 )); then
replicate_threaded \
"$maxTransThreads" "$procMult" "$srcResc" "$destResc" "$untilTS" "$totObjs" "$ObjCache"
totRepl="$(replicate_threaded \
"$maxTransThreads" "$procMult" "$srcResc" "$destResc" "$untilTS" "$totObjs" "$ObjCache")"
else
replicate_streaming "$procMult" "$srcResc" "$destResc" "$untilTS" "$totObjs" "$ObjCache"
totRepl="$(replicate_streaming \
"$procMult" "$srcResc" "$destResc" "$untilTS" "$totObjs" "$ObjCache")"
fi

printf 'Replicated %s data objects\n' "$totRepl" >&2
}

finish() {
Expand Down Expand Up @@ -439,8 +443,9 @@ replicate_streaming() {
< "$cohortList" \
2>&"$LOG" \
| tee >(cat >&"$LOG") \
| track_prog 0 "$totObjs" "$subTotal" \
> /dev/null
| track_prog 0 "$totObjs" "$subTotal"
else
echo 0
fi

rm --force "$cohortList"
Expand Down

0 comments on commit 3cbaee4

Please sign in to comment.