]> rtime.felk.cvut.cz Git - can-benchmark.git/commitdiff
Some uncommited changes found on my laptop
authorMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 12 Apr 2010 12:05:58 +0000 (14:05 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 12 Apr 2010 12:05:58 +0000 (14:05 +0200)
Makefile.omk
canping
tests/00-rtt.sh
tests/_lib.sh
tests/ethflood64k-w2.sh
tests/rtt-virtual.sh
tests/rtt-w.sh

index d03639f20b07704b0b3f6a47d84859867b073b69..de85fa3b85999a1f45b79d9e437d15b67aa95bf3 100644 (file)
@@ -2,6 +2,8 @@ SUBDIRS += ocera-can/canvca/libvca/
 SUBDIRS += ocera-can/lincan/
 SUBDIRS += ocera-can/utils/
 SUBDIRS += canping/src/
+SUBDIRS += utils
 
 bin_PROGRAMS = hackbench
 hackbench_SOURCES = hackbench.c
+
diff --git a/canping b/canping
index c6909617dbb0c2b519fb23c1d9c6ec8c95b4484e..9c02efb698d2072ac7de98f5f606b44280c40518 160000 (submodule)
--- a/canping
+++ b/canping
@@ -1 +1 @@
-Subproject commit c6909617dbb0c2b519fb23c1d9c6ec8c95b4484e
+Subproject commit 9c02efb698d2072ac7de98f5f606b44280c40518
index 84cfbadc13c0ca769b4bbb9c711ac144c10bc129..f20a4147fc84d85bd9a16c082d2eeffb6b639593 100755 (executable)
@@ -16,8 +16,8 @@ set logscale y
 set grid
 set xlabel "Time [ms]"
 set ylabel "Latency profile [messages]"
-plot [0:] "socketcan-1000.dat" with lp title "Socketcan",\
-              "lincan-1000.dat" with lp title "Lincan"
+plot [0:] "socketcan-1000.dat" with steps title "Socketcan",\
+              "lincan-1000.dat" with steps title "Lincan"
 EOF
 }
 
index c512d3519d73e2a2f9eb957809ea0c912adbca26..930f6885a57ce68e396e1c7b7be5f3acda436bf6 100644 (file)
@@ -30,7 +30,7 @@ boost_irq_prio() {
 }
 
 rmmod_can() {
-    modprobe -r lincan kvaser_pci vcan
+    modprobe -r lincan kvaser_pci vcan || true
 }
 
 prepare_lincan_hw() {
@@ -78,7 +78,7 @@ prepare_socketcan_hw() {
 prepare_socketcan_virtual() {
     rmmod_can
     modprobe vcan
-    ip link add dev vcan0 type vcan
+    ip link add dev vcan0 type vcan || true
     ip link set up dev vcan0
     CAN0=socketcan:vcan0
     CAN1=socketcan:vcan0
@@ -114,6 +114,7 @@ kvers() {
 
 plot() {
 #    for i in "${!PLOT_CMD[@]}"; do
+    local testname=`basename $0 .sh`
     for i in 0; do
        cmd=`p`                 # Get plot commands
        cmd=$(echo "$cmd" | sed -e "/set title/ s/[\"']\(.*\)[\"']/\"\1\\\\n($(kvers), CPU\\\\\\\\@${clk}MHz)\"/")
@@ -154,11 +155,15 @@ create_dirs_and_links() {
 
 go() {
     echo "####################"
-    mhz=`sed -ne '/^cpu MHz/ s/.*:\([^.]+\).*/\1/p' /proc/cpuinfo|head -n 1`
-    if [ -r /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq ]; then
-       local max=$((`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq`/1000))
-       local min=$((`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq`/1000))
-       mhz="$max $min"
+    if [ ! -n "$OPT_PLOT_ONLY" ]; then
+       mhz=`sed -ne '/^cpu MHz/ s/.*:\([^.]\+\).*/\1/p' /proc/cpuinfo|head -n 1`
+       if [ -r /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq ]; then
+           local max=$((`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq`/1000))
+           local min=$((`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq`/1000))
+           mhz="$max $min"
+       fi
+    else
+       mhz=$(cd results/by-clck; echo *)
     fi
     for clk in $mhz; do
     echo "===================="
index 727bb5370116217c2d7c085c79ce5a9f1dd7c289..3ddcea98bc2aec830e2f848e7c77a2d8df69fc80 100755 (executable)
@@ -25,7 +25,7 @@ t() {
 
 
 p() { cat <<EOF
-set title "Round-trip time with ethernet load (ping -fs 64000) 2ms wait between sends"
+set title "Round-trip time with ethernet load (ping -fs 64000) 2ms delay"
 set logscale y
 set grid
 set xlabel "Time [ms]"
index 4c3d4c0d130e7f4c573f86cf9afc4dcaf881313f..d618e062a387d60939ead04714e18e3ad41d9f20 100755 (executable)
@@ -5,12 +5,12 @@
 t() {
     PID_S=`vca_canping -s 1 -b -R FF:$RTPRIO -d $CAN0`
     vca_canping -m 1 -R FF:$RTPRIO -v -g $DRIVER   -t 1 -d $CAN0 -w 0 -c $COUNT
-    vca_canping -m 1 -R FF:$RTPRIO -v -g $DRIVER-1 -t 1 -d $CAN0 -w 1 -c $COUNT
-    vca_canping -m 1 -R FF:$RTPRIO -v -g $DRIVER-2 -t 1 -d $CAN0 -w 2 -c $COUNT
+#    vca_canping -m 1 -R FF:$RTPRIO -v -g $DRIVER-1 -t 1 -d $CAN0 -w 1 -c $COUNT
+#    vca_canping -m 1 -R FF:$RTPRIO -v -g $DRIVER-2 -t 1 -d $CAN0 -w 2 -c $COUNT
     kill $PID_S
 }
 
-TESTS="lincan_virtual socketcan_virtual"
+TESTS=${TESTS:-lincan_virtual socketcan_virtual}
 
 p() { cat <<EOF
 set title "Round-trip time - virtual CAN"
@@ -18,11 +18,7 @@ set logscale y
 set grid
 set xlabel "Time [ms]"
 set ylabel "Latency profile [messages]"
-plot [0:] "socketcan-virtual-1000.dat" with lp title "Socketcan 0 ms delay",\
-          "lincan-virtual-1000.dat" with lp title "Lincan 0 ms delay",\
-          "socketcan-virtual-1-1000.dat" with lp lt 1 title "Socketcan 1 ms delay",\
-          "lincan-virtual-1-1000.dat" with lp lt 2 title "Lincan 1 ms delay",\
-          "socketcan-virtual-2-1000.dat" with lp lt 1 title "Socketcan 2 ms delay",\
-          "lincan-virtual-2-1000.dat" with lp lt 2 title  "Lincan 2 ms delay"
+plot [0:] "socketcan-virtual-1000.dat" with lp title "Socketcan - 0 ms delay",\
+          "lincan-virtual-1000.dat" with lp title "Lincan - 0 ms delay"
 EOF
 }
index 5dcae1ad77fcf1116ff5d4bbaae01cc0f09a494e..c196b7aa7efa1f9dfef3d7c12c9a43d15b82f98a 100755 (executable)
@@ -13,16 +13,16 @@ t() {
 
 
 p() { cat <<EOF
-set title "Round-trip time depending on delay between sends"
+set title "Round-trip time depending on delay between response reception and next send"
 set logscale y
 set grid
 set xlabel "Time [ms]"
 set ylabel "Latency profile [messages]"
-plot [0:] "socketcan-0-1000.dat" with lp lt 1 title "Socketcan 0sms",\
-          "lincan-0-1000.dat" with lp lt 2 title "Lincan 0 ms",\
-          "socketcan-1-1000.dat" with lp lt 1 title "Socketcan 1 ms",\
-          "lincan-1-1000.dat" with lp lt 2 title "Lincan 1 ms",\
-          "socketcan-2-1000.dat" with lp lt 1 title "Socketcan 2 ms",\
-          "lincan-2-1000.dat" with lp lt 2 title  "Lincan 2 ms"
+plot [0:] "socketcan-0-1000.dat" with lp lt 1 title "Socketcan - 0 ms delay",\
+          "lincan-0-1000.dat" with lp lt 2 title "Lincan -  0 ms delay",\
+          "socketcan-1-1000.dat" with lp lt 1 title "Socketcan -  1 ms delay",\
+          "lincan-1-1000.dat" with lp lt 2 title "Lincan -  1 ms delay",\
+          "socketcan-2-1000.dat" with lp lt 1 title "Socketcan -  2 ms delay",\
+          "lincan-2-1000.dat" with lp lt 2 title  "Lincan -  2 ms delay"
 EOF
 }