nicer status infos

This commit is contained in:
Vincent Riquer 2013-04-04 23:06:36 +02:00
parent 44e88068e5
commit 11cd29d843

37
atom
View File

@ -2052,16 +2052,15 @@ do
checkworkers checkworkers
cleaner cleaner
master master
if ((taskcount - remaining)) if (( ran ))
then then
currenttime=$(date +%s) currenttime=$(date +%s)
secsremaining=$(( avgduration=$((
remaining ((currenttime - starttime) * 1000)
*
(currenttime - starttime)
/ /
(taskcount - remaining) ran
)) ))
secsremaining=$(( remaining * avgduration / 1000 ))
(( days = (( days =
secsremaining secsremaining
/ /
@ -2077,12 +2076,28 @@ do
/ /
60 60
)) || true )) || true
(( seconds =
secsremaining
-
( ( ( ( days*24 + hours ) *60 ) + minutes ) *60 )
)) || true
avgduration=$(printf %04i $avgduration)
avgdsec=${avgduration:0:-3}
avgdmsec=${avgduration#$avgdsec}
fi fi
echo -en "\rload: $humanload / $maxload" \ dran=$(printf %${#taskcount}i ${ran:-0})
"workers: $active / $concurrency" \ rtime=$(
"done: $(( ran * 100 / taskcount ))%" \ printf '%2id %2ih%02im%02is' \
"- ${ran:-0} of $taskcount ($failed failed)" \ ${days:-0} \
"${days}d ${hours}h${minutes}m\c" ${hours:-0} \
${minutes:-0} \
${seconds:-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