}
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
-PLOT_CMD='
+p() { cat <<EOF
set title "Round-trip time with ethernet load - ping -f"
set logscale y
set grid
"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
+}
-PLOT_CMD='
+p() { cat <<EOF
set title "Round-trip time with ethernet load - ping -fs 64000"
set logscale y
set grid
"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
+}
-PLOT_CMD='
+p() { cat <<EOF
set title "Round-trip time with receive ethernet load"
set logscale y
set grid
"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
+}
-PLOT_CMD='
+p() { cat <<EOF
set title "Round-trip time with send ethernet load"
set logscale y
set grid
set ylabel "Latency profile [messages]"
plot [0:] "socketcan-1000.dat" with lp title "Socketcan",\
"lincan-1000.dat" with lp title "Lincan"
-'
-
+EOF
+}
TESTS="lincan_virtual socketcan_virtual"
-PLOT_CMD='
+p() { cat <<EOF
set title "Round-trip time - virtual CAN"
set logscale y
set grid
set ylabel "Latency profile [messages]"
plot [0:] "socketcan-virtual-1000.dat" with lp title "Socketcan",\
"lincan-virtual-1000.dat" with lp title "Lincan"
-'
-
+EOF
+}
-PLOT_CMD='
+p() { cat <<EOF
set title "Round-trip time depending on delay between sends"
set logscale y
set grid
"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
+}
-PLOT_CMD='
+p() { cat <<EOF
set title "Round-trip time"
set logscale y
set grid
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"