facelift
This commit is contained in:
parent
6297dd6af7
commit
74d93ff904
36
atom
36
atom
@ -42,6 +42,8 @@ declare -r \
|
|||||||
\
|
\
|
||||||
oldIFS="$IFS"
|
oldIFS="$IFS"
|
||||||
|
|
||||||
|
LC_ALL=C
|
||||||
|
|
||||||
source $SHAREDIR/id3genres
|
source $SHAREDIR/id3genres
|
||||||
|
|
||||||
shopt -s extglob
|
shopt -s extglob
|
||||||
@ -2142,16 +2144,12 @@ echo -e "\rCreated ${count:-0} tasks for $filecount files (${copies:-0} immediat
|
|||||||
concurrency=$(( maxload / 2 ))
|
concurrency=$(( maxload / 2 ))
|
||||||
(( concurrency )) || concurrency=1
|
(( concurrency )) || concurrency=1
|
||||||
active=0
|
active=0
|
||||||
#set -x
|
|
||||||
for (( i=0 ; i < concurrency ; i++ ))
|
|
||||||
do
|
|
||||||
master
|
|
||||||
done
|
|
||||||
concurrencychange=$(date +%s)
|
concurrencychange=$(date +%s)
|
||||||
starttime=$concurrencychange
|
starttime=$concurrencychange
|
||||||
taskcount=$count
|
taskcount=$count
|
||||||
|
remaining=$taskcount
|
||||||
failed=0
|
failed=0
|
||||||
while (( ${#workers[@]} ))
|
while (( remaining ))
|
||||||
do
|
do
|
||||||
if read -n 1 -t 0.1 userinput
|
if read -n 1 -t 0.1 userinput
|
||||||
then
|
then
|
||||||
@ -2218,19 +2216,25 @@ do
|
|||||||
avgdsec=${avgduration:0:-3}
|
avgdsec=${avgduration:0:-3}
|
||||||
avgdmsec=${avgduration#$avgdsec}
|
avgdmsec=${avgduration#$avgdsec}
|
||||||
fi
|
fi
|
||||||
dran=$(printf %${#taskcount}i ${ran:-0})
|
fmtload='L: %2.1f/%i'
|
||||||
rtime=$(
|
fmtworkers='W: %i/%i'
|
||||||
printf '%2id %2ih%02im%02is' \
|
fmtprogress="T:%${#taskcount}i/%i (F:%i) %3i%%"
|
||||||
|
fmttime='%2id %2ih%02im%02is (A:%2.1fs/task)'
|
||||||
|
printf \
|
||||||
|
"\r$fmtload $fmtworkers $fmtprogress $fmttime" \
|
||||||
|
$humanload \
|
||||||
|
$maxload \
|
||||||
|
${active:-0} \
|
||||||
|
${concurrency:-0} \
|
||||||
|
${ran:-0} \
|
||||||
|
${taskcount:-0} \
|
||||||
|
${failed:-0} \
|
||||||
|
$(( ran * 100 / taskcount )) \
|
||||||
${days:-0} \
|
${days:-0} \
|
||||||
${hours:-0} \
|
${hours:-0} \
|
||||||
${minutes:-0} \
|
${minutes:-0} \
|
||||||
${seconds:-0}
|
${seconds:-0} \
|
||||||
)
|
${avgdsec:-0}.${avgdmsec:-0}
|
||||||
percent=$(printf %3i $((ran * 100 / taskcount)))
|
|
||||||
echo -en "\rL: $humanload/$maxload" \
|
|
||||||
"W: $active/$concurrency" \
|
|
||||||
"T: ${dran}/$taskcount (F:$failed) $percent% $rtime" \
|
|
||||||
"(A: ${avgdsec:--}.${avgdmsec:--}s/task)"
|
|
||||||
done
|
done
|
||||||
unset count
|
unset count
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user