Files
reactics/drs_benchmark.sh
2018-10-20 22:41:45 +01:00

49 lines
925 B
Bash
Executable File

#!/bin/sh
TMPINPUT="tmp_$RANDOM$RANDOM.rs"
CMD="./reactics -bB"
for opt in "" "z" "x" "zx";do
for i in `seq 2 10`;do
echo "[i] n=$i; generating input file"
in/scripts/gen_tgc_sc.py $i > $TMPINPUT
for f in `seq 1 2`; do
echo "[i] Testing formula f$f"
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"
res=$($TMPCMD | grep STAT)
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_tgc_${opt_str}_f$f.dat
done
echo
done
done
rm -f $TMPINPUT
# EOF