Benchmarking script

This commit is contained in:
Artur Meski
2018-10-20 22:41:45 +01:00
parent 75007f04dd
commit 2088994fa7

View File

@@ -2,9 +2,11 @@
TMPINPUT="tmp_$RANDOM$RANDOM.rs" TMPINPUT="tmp_$RANDOM$RANDOM.rs"
CMD="./reactics -zxbB" CMD="./reactics -bB"
for i in `seq 2 9`;do for opt in "" "z" "x" "zx";do
for i in `seq 2 10`;do
echo "[i] n=$i; generating input file" echo "[i] n=$i; generating input file"
in/scripts/gen_tgc_sc.py $i > $TMPINPUT in/scripts/gen_tgc_sc.py $i > $TMPINPUT
@@ -13,7 +15,15 @@ for i in `seq 2 9`;do
echo "[i] Testing formula f$f" echo "[i] Testing formula f$f"
TMPCMD="$CMD -c f$f $TMPINPUT" if [[ "$opt" = "" ]];then
opt_str="NoOpt"
CMDOPT=""
else
opt_str="$opt"
CMDOPT="-$opt"
fi
TMPCMD="$CMD $CMDOPT -c f$f $TMPINPUT"
echo "[i] running reactics: $TMPCMD" echo "[i] running reactics: $TMPCMD"
res=$($TMPCMD | grep STAT) res=$($TMPCMD | grep STAT)
@@ -22,12 +32,15 @@ for i in `seq 2 9`;do
echo "[.] Finished. time:$time, mem:$mem" echo "[.] Finished. time:$time, mem:$mem"
echo "$i $time $mem" >> bench_drs_mutex_f$f.dat
echo "$i $time $mem" >> bench_drs_tgc_${opt_str}_f$f.dat
done done
echo echo
done
done done
rm -f $TMPINPUT rm -f $TMPINPUT