]> rtime.felk.cvut.cz Git - can-benchmark.git/commitdiff
Convert plot commands to be returned by function p()
authorMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 27 Aug 2009 17:23:41 +0000 (19:23 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 27 Aug 2009 17:23:41 +0000 (19:23 +0200)
tests/_lib.sh
tests/ethflood.sh
tests/ethflood64k.sh
tests/ethload.sh
tests/ethloadsend.sh
tests/rtt-virtual.sh
tests/rtt-w.sh
tests/rtt.sh

index 64620c0e732471f7fa211c795844f58cac24e0d3..0df9d9133b41a690140e28dff1159986e9e63a6d 100644 (file)
@@ -100,8 +100,9 @@ kvers() {
 }
 
 plot() {
-    for i in "${!PLOT_CMD[@]}"; do
-       cmd="${PLOT_CMD[$i]}";
+#    for i in "${!PLOT_CMD[@]}"; do
+    for i in 0; do
+       cmd=`p`                 # Get plot commands
        cmd=$(echo "$cmd" | sed -e "/set title/ s/[\"']\(.*\)[\"']/'\1 ($(kvers), CPU\\\\@${clk}Mhz)'/")
        if [ -z "$OPT_NO_X11" ]; then
            echo "set terminal x11 enhanced; ${cmd}" | gnuplot -persist
index 628856ecbb36b7c23a4c8ba7c53d31db9ef2e323..cdad2cd2e739bc60b5e10996d73ef11fee04f45d 100755 (executable)
@@ -18,7 +18,7 @@ t() {
 
 
 
-PLOT_CMD='
+p() { cat <<EOF
 set title "Round-trip time with ethernet load - ping -f"
 set logscale y
 set grid
@@ -28,5 +28,5 @@ plot [0:] "socketcan-norm-1000.dat" with lp lt 1 title "Socketcan",\
           "lincan-norm-1000.dat" with lp lt 2 title "Lincan",\
           "socketcan-boost-1000.dat" with lp lt 1 title "Socketcan boosted IRQ prio",\
           "lincan-boost-1000.dat" with lp lt 2 title "Lincan boosted IRQ prio"
-'
-
+EOF
+}
index 2d40f3aad4fc4e53227719efd8e6d922fcfd3320..716a466ca7a95e71f33917e9ad5fc070f2b435ed 100755 (executable)
@@ -18,7 +18,7 @@ t() {
 
 
 
-PLOT_CMD='
+p() { cat <<EOF
 set title "Round-trip time with ethernet load - ping -fs 64000"
 set logscale y
 set grid
@@ -28,5 +28,5 @@ plot [0:] "socketcan-norm-1000.dat" with lp lt 1 title "Socketcan",\
           "lincan-norm-1000.dat" with lp lt 2 title "Lincan",\
           "socketcan-boost-1000.dat" with lp lt 1 title "Socketcan boosted IRQ prio",\
           "lincan-boost-1000.dat" with lp lt 2 title "Lincan boosted IRQ prio"
-'
-
+EOF
+}
index 8aecd34a70169b582e8acdcca281758db7bcbc81..41dd77704e9d54aac242349e385dd12d0447fa67 100755 (executable)
@@ -18,7 +18,7 @@ t() {
 
 
 
-PLOT_CMD='
+p() { cat <<EOF
 set title "Round-trip time with receive ethernet load"
 set logscale y
 set grid
@@ -28,5 +28,5 @@ plot [0:] "socketcan-norm-1000.dat" with lp lt 1 title "Socketcan",\
           "lincan-norm-1000.dat" with lp lt 2 title "Lincan",\
           "socketcan-boost-1000.dat" with lp lt 1 title "Socketcan boosted IRQ prio",\
           "lincan-boost-1000.dat" with lp lt 2 title "Lincan boosted IRQ prio"
-'
-
+EOF
+}
index 8a9fc166876f68f3f12bfef87400355cc336d3c1..0c3f7390a3b79da99d8a86cdbdcb3cf7242ee119 100755 (executable)
@@ -13,7 +13,7 @@ t() {
 
 
 
-PLOT_CMD='
+p() { cat <<EOF
 set title "Round-trip time with send ethernet load"
 set logscale y
 set grid
@@ -21,5 +21,5 @@ set xlabel "Time [{/Symbol m}s]"
 set ylabel "Latency profile [messages]"
 plot [0:] "socketcan-1000.dat" with lp title "Socketcan",\
           "lincan-1000.dat" with lp title "Lincan"
-'
-
+EOF
+}
index cf8cca43cbb3ae73d40b8f2eff0d106d8d579908..1762d33fff4d411aaaa857e63195e1fdad014e2b 100755 (executable)
@@ -10,7 +10,7 @@ t() {
 
 TESTS="lincan_virtual socketcan_virtual"
 
-PLOT_CMD='
+p() { cat <<EOF
 set title "Round-trip time - virtual CAN"
 set logscale y
 set grid
@@ -18,5 +18,5 @@ set xlabel "Time [{/Symbol m}s]"
 set ylabel "Latency profile [messages]"
 plot [0:] "socketcan-virtual-1000.dat" with lp title "Socketcan",\
           "lincan-virtual-1000.dat" with lp title "Lincan"
-'
-
+EOF
+}
index a91308b4f2f28f80201c0e89c4d26e993dc9dde0..accca40915ddaf4b6596fb1cba9402e3b2e7befc 100755 (executable)
@@ -12,7 +12,7 @@ t() {
 
 
 
-PLOT_CMD='
+p() { cat <<EOF
 set title "Round-trip time depending on delay between sends"
 set logscale y
 set grid
@@ -24,4 +24,5 @@ plot [0:] "socketcan-0-1000.dat" with lp lt 1 title "Socketcan 0",\
           "lincan-1-1000.dat" with lp lt 2 title "Lincan 1",\
           "socketcan-2-1000.dat" with lp lt 1 title "Socketcan 2",\
           "lincan-2-1000.dat" with lp lt 2 title  "Lincan 2"
-'
+EOF
+}
index f0ce6673a2c28fb93a9cb28e41ce0ae1d2a1c08f..f79a06cd8bd4fcb28ba2cfa7b259308ded42fe49 100755 (executable)
@@ -10,7 +10,7 @@ t() {
 
 
 
-PLOT_CMD='
+p() { cat <<EOF
 set title "Round-trip time"
 set logscale y
 set grid
@@ -18,7 +18,8 @@ set xlabel "Time [{/Symbol m}s]"
 set ylabel "Latency profile [messages]"
 plot [0:] "socketcan-1000.dat" with lp title "Socketcan",\
               "lincan-1000.dat" with lp title "Lincan"
-'
+EOF
+}
 
 PLOT_CMD[1]='
 set title "Round-trip time history"