#! /bin/zsh # systems: ~/public_html/hs-linux/sys/base-faculty-1 # ~/public_html/hs-linux/sys/base-faculty-2 # results: ~/public_html/hs-linux/results/memory-experiment-tables.log source ${0:h}/be-paths # ./be-paths echo-and-file () { echo $1 | tee -a $MEM_EXP_RES } exit-memory-experiment () { be-start; be-kill mplayer } run-memory-experiment () { rm -f $MEM_EXP_RES be-init be-start be-movie & echo-and-file "\\\tiny\n" for system in base-faculty-{1,2}; do echo-and-file "\\\subsubsection{\\\texttt{$system}}\n" echo-and-file "\\\begin{tabular}{l l l}" echo-and-file "supposed & actual & error ratio \\\\\\ \\\hline" for budget in {1000000..1..-10000}; do hs -s $system -i -h -r -Q -f -x -m $budget \ 2> /dev/null | tee -a $MEM_EXP_RES if [[ $? == 255 ]]; then exit-memory-experiment; return; fi done echo-and-file "\\\end{tabular}\n" done echo-and-file "\\\normalsize\n" exit-memory-experiment }