X-Git-Url: http://rtime.felk.cvut.cz/gitweb/can-benchmark.git/blobdiff_plain/4bcafe205c56626b3d549b39d24ff4f033563d84..ee367e21f2ccb37e6593c2545658280ec815ca88:/gw-tests/lib.sh diff --git a/gw-tests/lib.sh b/gw-tests/lib.sh index f4e74ac..05b28d1 100644 --- a/gw-tests/lib.sh +++ b/gw-tests/lib.sh @@ -43,7 +43,7 @@ cleanupgw() { _plot() { local testname=`basename $0 .sh` - plot_cmds | sed -e "/set title/ s/[\"']\(.*\)[\"']/\"\1\\\\n($kvers)\"/" > plot.gp + plot_cmds | sed -e "/set title/ s/[\"']\(.*\)[\"']/\"\1\\\\n(GW kernel $kvers, traffic $traffic)\"/" > plot.gp if [[ ! -s plot.gp ]]; then return; fi if [ -z "$OPT_NO_X11" ]; then echo "set terminal x11 enhanced; $(< plot.gp)" | gnuplot -persist @@ -78,6 +78,12 @@ traffic_and_length() { echo $opts -l $1 } +start_load() { +} + +kill_load() { +} + _measure() { # Remove data from the last measurement rm -rf * @@ -88,7 +94,7 @@ _measure() { export hostkvers=$hostkvers export traffic=$traffic cd \$(dirname \$0)/$(dirname $script) - exec ./$(basename $script) --plot + exec ./$(basename $script) --plot "\$@" EOF chmod +x plot.sh # Set can interfaces up @@ -103,8 +109,11 @@ _measure() { # Set the length of qdisc queue to avoid ENOBUFS errors ifconfig can0 txqueuelen 200 cleanupgw - + + prepare + start_load main + kill_load } @@ -121,19 +130,14 @@ _run() { mkdir -p $dir script=$(echo $dir | sed -e 's/[^/]*/../g')/${test}.sh cd $dir - echo "Working directory: $dir" if [[ ! "$OPT_PLOT_ONLY" ]]; then + echo "Working directory: $dir" _measure fi if [[ ! "$OPT_PLOT_DISABLE" ]]; then - if [[ "$OPT_PLOT_ONLY" ]]; then - _plot - else - # Call ourselves once again - ./plot.sh - fi + _plot fi - cd - + cd - > /dev/null done }