#! /bin/zsh source ${0:h}/be-paths # ./be-paths run-experiment () { # result dir local name=$1 local system=$PROJECT_PATH/sys/$name local this_result_path=$RESULTS_PATH/$name rm -rf $this_result_path mkdir -p $this_result_path # Lisp file local lisp_file=$this_result_path/lisp.log # to-be stats files local tick_times_file=tick_times.log local stats_file=stats.log rm -f $stats_file $tick_times_file #### BE be-init be-movie & #### critical core time-elisp $lisp_file & if [[ $# == 2 ]]; then run-hs-p $name else run-hs $name fi # store results local global_tick=`grep "Global scheduling rate:" $system | cut -d" " -f4` do-tick-stats $tick_times_file $global_tick mv $tick_times_file $stats_file $this_result_path tail -n 1 $this_result_path/$HS_OUTPUT | \ cut -d ' ' -f 2 > $this_result_path/BE.txt head -n 6 $this_result_path/stats.log > $this_result_path/stats.txt # clean be-kill mplayer be-start } run-task-system-experiment () { # system: ~/public_html/hs-linux/sys/base # results: ~/public_html/hs-linux/results/base run-experiment base # ~/public_html/hs-linux/sys/long-ticks # ~/public_html/hs-linux/results/long-ticks run-experiment long-ticks # ~/public_html/hs-linux/sys/short-period # ~/public_html/hs-linux/results/short-period run-experiment long-period }