mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-30 08:34:16 +01:00
simplify and print in order
This commit is contained in:
parent
7560156351
commit
4835afbe4a
1 changed files with 7 additions and 11 deletions
|
@ -226,6 +226,7 @@ build_cmds() {
|
||||||
# PARAMS="$PARAMS --savefail-pct 10"
|
# PARAMS="$PARAMS --savefail-pct 10"
|
||||||
[ -n "$SEED" ] && PARAMS="$PARAMS --seed $RANDOM"
|
[ -n "$SEED" ] && PARAMS="$PARAMS --seed $RANDOM"
|
||||||
PARAMS="$PARAMS $PUBLIC"
|
PARAMS="$PARAMS $PUBLIC"
|
||||||
|
|
||||||
ARGS[$COUNTER]=$PARAMS
|
ARGS[$COUNTER]=$PARAMS
|
||||||
ROOMS[$COUNTER]=$ROOM
|
ROOMS[$COUNTER]=$ROOM
|
||||||
FILES[$COUNTER]=$FILE
|
FILES[$COUNTER]=$FILE
|
||||||
|
@ -457,12 +458,10 @@ update_ldevid() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
summarizeLogs() {
|
summarizeTileCounts() {
|
||||||
local COUNT=${#ARGS[*]}
|
|
||||||
local STR=''
|
local STR=''
|
||||||
local INDX=0
|
local KEYS=( ${!ARGS[*]} )
|
||||||
while [ $INDX -lt $COUNT ]; do
|
for KEY in ${KEYS[@]}; do
|
||||||
local KEY=${KEYS[$INDX]}
|
|
||||||
local LOG=${LOGS[$KEY]}
|
local LOG=${LOGS[$KEY]}
|
||||||
|
|
||||||
local LINE=$(grep pool_removeTiles $LOG | tail -n 1)
|
local LINE=$(grep pool_removeTiles $LOG | tail -n 1)
|
||||||
|
@ -470,13 +469,10 @@ summarizeLogs() {
|
||||||
local NUM=$(echo $LINE | sed 's,^.*removeTiles: \(.*\) tiles.*$,\1,')
|
local NUM=$(echo $LINE | sed 's,^.*removeTiles: \(.*\) tiles.*$,\1,')
|
||||||
STR="${STR}${KEY}:${NUM};"
|
STR="${STR}${KEY}:${NUM};"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
INDX=$((1 + INDX))
|
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -n "${STR}" ]; then
|
if [ -n "${STR}" ]; then
|
||||||
echo -n "$(date +%r) tiles left: "
|
echo "$(date +%r) tiles left: $STR"
|
||||||
echo $STR;
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -496,11 +492,11 @@ run_cmds() {
|
||||||
|
|
||||||
LOOPCOUNT=$((1 + LOOPCOUNT))
|
LOOPCOUNT=$((1 + LOOPCOUNT))
|
||||||
if [ 0 -eq $((LOOPCOUNT % 20)) ]; then
|
if [ 0 -eq $((LOOPCOUNT % 20)) ]; then
|
||||||
summarizeLogs
|
summarizeTileCounts
|
||||||
fi
|
fi
|
||||||
|
|
||||||
INDX=$(($RANDOM%COUNT))
|
INDX=$(($RANDOM%COUNT))
|
||||||
KEYS=( ${!ARGS[*]} )
|
local KEYS=( ${!ARGS[*]} )
|
||||||
KEY=${KEYS[$INDX]}
|
KEY=${KEYS[$INDX]}
|
||||||
ROOM=${ROOMS[$KEY]}
|
ROOM=${ROOMS[$KEY]}
|
||||||
if [ 0 -eq ${PIDS[$KEY]} ]; then
|
if [ 0 -eq ${PIDS[$KEY]} ]; then
|
||||||
|
|
Loading…
Add table
Reference in a new issue