#!/bin/zsh source ${0:h}/be-paths # ./be-paths ce-hs () { hs -s base -r -Q } ce-time-elisp () { time-elisp $CONTENTION_RESULT } ce-echo () { echo $@ "\n" >> $CONTENTION_RESULT } run-contention-experiment () { rm -f $CONTENTION_RESULT be-init echo "Be patient..." ce-echo "* (compilation time without hs)" ce-time-elisp ce-echo "* with hs:" ce-hs & ce-time-elisp be-kill hs ce-echo "* with hs and the best-effort media player:" ce-hs & be-movie & ce-time-elisp be-kill mplayer hs ce-echo "* with hs and stress:" local system=$PROJECT_PATH/sys/base local system_time_ms=`grep "Global lifetime:" $system | cut -d" " -f3` local system_time_s=$(($system_time_ms/1000)) ce-hs & be-stress 10 $system_time_s & ce-time-elisp be-kill stress hs ce-echo "* with hs, stress and the BE media player:" ce-hs & be-movie & be-stress 10 $system_time_s & ce-time-elisp be-kill stress mplayer hs }