Benchmarking

This commit is contained in:
Artur Meski
2018-11-25 14:47:21 +00:00
parent 3db8fe1037
commit 252af97897

View File

@@ -5,51 +5,62 @@ TMPINPUT="tmp_$RANDOM$RANDOM.rs"
CMD="./reactics -B" CMD="./reactics -B"
timelimit="$((30*60))" # 30 minutes timelimit="$((30*60))" # 30 minutes
timelimit="$((5*60))" # 5 minutes
for opt in "z" "zb" "x" "xz" "xzb" "xb" "" "b";do form_tgc_sc="`seq 1 3`"
form_asm="`seq 1 2`"
for f in `seq 1 3`; do for benchmark in "tgc_sc" "asm"; do
done=0 eval formulae=\$form_${benchmark}
for i in `seq 2 20`;do for opt in "z" "zb" "x" "xz" "xzb" "xb" "" "b";do
if [[ $done -eq 1 ]];then for f in $formulae; do
echo "Skipping f=$f i=$i for $opt"
continue
fi
echo "[i] n=$i; generating input file" done=0
in/scripts/gen_tgc_sc.py $i > $TMPINPUT
echo "[i] Testing formula f$f" for i in `seq 2 20`;do
if [[ "$opt" = "" ]];then if [[ $done -eq 1 ]];then
opt_str="NoOpt" echo "Skipping f=$f i=$i for $opt"
CMDOPT="" continue
else fi
opt_str="$opt"
CMDOPT="-$opt"
fi
TMPCMD="$CMD $CMDOPT -c f$f $TMPINPUT" echo "[i] n=$i; generating input file (${benchmark})"
echo "[i] running reactics: $TMPCMD" in/scripts/gen_${benchmark}.py $i > $TMPINPUT
res=$(timeout $timelimit $TMPCMD | grep STAT) echo "[i] Testing formula f$f"
if [[ $? -ne 0 ]];then
done=1
fi
mem=$(echo $res | cut -d';' -f 5)
time=$(echo $res | cut -d';' -f 6)
echo "[.] Finished. time:$time, mem:$mem" if [[ "$opt" = "" ]];then
opt_str="NoOpt"
CMDOPT=""
else
opt_str="$opt"
CMDOPT="-$opt"
fi
echo "$i $time $mem" >> bench_drs_tgc_${opt_str}_f$f.dat TMPCMD="$CMD $CMDOPT -c f$f $TMPINPUT"
echo "[i] running reactics: $TMPCMD"
res=$(timeout $timelimit $TMPCMD | grep STAT)
if [[ $? -ne 0 ]];then
done=1
continue
fi
mem=$(echo $res | cut -d';' -f 5)
time=$(echo $res | cut -d';' -f 6)
echo "[.] Finished. time:$time, mem:$mem"
echo "$i $time $mem" >> bench_drs_${benchmark}_${opt_str}_f$f.dat
done
echo
done done
echo
done done
done done