From: Michal Sojka Date: Wed, 1 Dec 2010 11:55:27 +0000 (+0100) Subject: lib: Add echo_plot() to make plotting of multiple graphs easier X-Git-Tag: fix-allnoconfig~295 X-Git-Url: http://rtime.felk.cvut.cz/gitweb/can-benchmark.git/commitdiff_plain/4a896b80a58599689b2e9158534a57bb42b399a4 lib: Add echo_plot() to make plotting of multiple graphs easier --- diff --git a/gw-tests/gw-filter.sh b/gw-tests/gw-filter.sh index bebdc3f..757f328 100755 --- a/gw-tests/gw-filter.sh +++ b/gw-tests/gw-filter.sh @@ -22,11 +22,9 @@ plot [0:1500] [1:$COUNT] \\ EOF lt=1 for i in $ids; do - (( i != 0)) && echo ", \\" - echo -n " " \"hist-$i.dat\" with lp lt $lt title \"Message id $i\" + echo_plot "\"hist-$i.dat\" with lp lt $lt title \"Message id $i\"" lt=$((lt+1)) done - echo } test_end diff --git a/gw-tests/lib.sh b/gw-tests/lib.sh index 439ddc7..cacde47 100644 --- a/gw-tests/lib.sh +++ b/gw-tests/lib.sh @@ -65,6 +65,13 @@ create_dirs_and_links() { echo $d } +echo_plot() { + plot=$1 + [[ "$_plot_separator" ]] && echo ", \\" + _plot_separator=t + echo -n " " $plot +} + _run() { if [[ ! "$OPT_PLOT_ONLY" ]]; then kernel_versions=$(sshgw uname -r)