]> rtime.felk.cvut.cz Git - can-benchmark.git/commitdiff
Add detailed graph to nop and show time starting at zero in *-time
authorMichal Sojka <sojkam1@fel.cvut.cz>
Sun, 12 Dec 2010 12:06:42 +0000 (13:06 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Sun, 12 Dec 2010 12:06:42 +0000 (13:06 +0100)
gw-tests/nop-highprio-time.sh
gw-tests/nop-time.sh
gw-tests/nop.sh

index a5a00057c1a52ee889db0ae6649f6d4f1240e95c..9b125f79f23c7f406d52d548633cf30aedc608e3 100755 (executable)
@@ -7,7 +7,8 @@ main() {
 }
 
 plot_cmds() {
 }
 
 plot_cmds() {
-    cat <<'EOF'
+    min=$(head -n 1 len2-msgs.txt | awk '{ print $2 }')
+    cat <<EOF
 set title "Single GW job for all messages, no modifications, high (soft)irq task priority"
 set logscale y
 set grid xtics ytics mytics lw 1, lw 0.5
 set title "Single GW job for all messages, no modifications, high (soft)irq task priority"
 set logscale y
 set grid xtics ytics mytics lw 1, lw 0.5
@@ -15,10 +16,10 @@ set key left
 set xlabel "Time [s]"
 set ylabel "Latency [ms]"
 plot [:] [0.06:4] \
 set xlabel "Time [s]"
 set ylabel "Latency [ms]"
 plot [:] [0.06:4] \
-          "len2-msgs.txt" using 2:(1000*$14) with points title "2 byte messages", \
-          "len4-msgs.txt" using 2:(1000*$14) with points title "4 byte messages", \
-          "len6-msgs.txt" using 2:(1000*$14) with points title "6 byte messages", \
-          "len8-msgs.txt" using 2:(1000*$14) with points title "8 byte messages"
+          "len2-msgs.txt" using (\$2-$min):(1000*\$14) with points title "2 byte messages", \
+          "len4-msgs.txt" using (\$2-$min):(1000*\$14) with points title "4 byte messages", \
+          "len6-msgs.txt" using (\$2-$min):(1000*\$14) with points title "6 byte messages", \
+          "len8-msgs.txt" using (\$2-$min):(1000*\$14) with points title "8 byte messages"
 EOF
 }
     
 EOF
 }
     
index 479f600b9b8bc621170a63e95e405f574d030d46..4ece3843ceb8a6c770b3f7586bd28e939b72fe43 100755 (executable)
@@ -6,19 +6,27 @@ main() {
        ln -s ../nop/*.txt .
 }
 
        ln -s ../nop/*.txt .
 }
 
+ADDITIONAL_PLOTS=detail
+
 plot_cmds() {
 plot_cmds() {
-    cat <<'EOF'
+    if [[ "$1" = detail ]]; then
+       range=0.06:0.3
+    else
+       range=0.06:4
+       echo "set logscale y"
+    fi
+    min=$(head -n 1 len2-msgs.txt | awk '{ print $2 }')
+    cat <<EOF
 set title "Single GW job for all messages, no modifications"
 set title "Single GW job for all messages, no modifications"
-set logscale y
 set grid xtics ytics mytics lw 1, lw 0.5
 set key left
 set xlabel "Time [s]"
 set ylabel "Latency [ms]"
 set grid xtics ytics mytics lw 1, lw 0.5
 set key left
 set xlabel "Time [s]"
 set ylabel "Latency [ms]"
-plot [:] [0.06:4] \
-          "len2-msgs.txt" using 2:(1000*$14) with points title "2 byte messages", \
-          "len4-msgs.txt" using 2:(1000*$14) with points title "4 byte messages", \
-          "len6-msgs.txt" using 2:(1000*$14) with points title "6 byte messages", \
-          "len8-msgs.txt" using 2:(1000*$14) with points title "8 byte messages"
+plot [:] [$range] \
+          "len2-msgs.txt" using (\$2-$min):(1000*\$14) with points title "2 byte messages", \
+          "len4-msgs.txt" using (\$2-$min):(1000*\$14) with points title "4 byte messages", \
+          "len6-msgs.txt" using (\$2-$min):(1000*\$14) with points title "6 byte messages", \
+          "len8-msgs.txt" using (\$2-$min):(1000*\$14) with points title "8 byte messages"
 EOF
 }
     
 EOF
 }
     
index d3f6ff3747f76f7612468a58c808030aa1b33777..4a01e68631c40cc71f50fa0ad3eb06e24922b2fb 100755 (executable)
@@ -10,14 +10,22 @@ main() {
     latester -d can0 -d can1 -d can2 -c $COUNT $(traffic_and_length 8) -n len8
 }
 
     latester -d can0 -d can1 -d can2 -c $COUNT $(traffic_and_length 8) -n len8
 }
 
+ADDITIONAL_PLOTS=detail
+
 plot_cmds() {
 plot_cmds() {
+    if [[ "$1" = detail ]]; then
+       range=0.06:0.3
+       echo "set logscale y"
+    else
+       range=0.05:100
+       echo "set logscale xy"
+    fi
     cat <<EOF
 set title "Single GW job for all messages, no modifications"
     cat <<EOF
 set title "Single GW job for all messages, no modifications"
-set logscale xy
 set grid xtics mxtics ytics mytics lw 1, lw 0.5
 set xlabel "Time [ms]"
 set ylabel "Latency profile [messages]"
 set grid xtics mxtics ytics mytics lw 1, lw 0.5
 set xlabel "Time [ms]"
 set ylabel "Latency profile [messages]"
-plot [0.05:100] [1:$COUNT] \
+plot [$range] [1:$COUNT] \
           "len2-hist.txt" with lp lt 1 title "2 byte messages", \
           "len4-hist.txt" with lp lt 2 title "4 byte messages", \
           "len6-hist.txt" with lp lt 3 title "6 byte messages", \
           "len2-hist.txt" with lp lt 1 title "2 byte messages", \
           "len4-hist.txt" with lp lt 2 title "4 byte messages", \
           "len6-hist.txt" with lp lt 3 title "6 byte messages", \