]> rtime.felk.cvut.cz Git - lisovros/canprio_benchmark.git/commitdiff
Reworked SAMQ charts.
authorRostislav Lisovy <lisovy@gmail.com>
Fri, 23 Sep 2011 15:32:26 +0000 (17:32 +0200)
committerRostislav Lisovy <lisovy@gmail.com>
Fri, 23 Sep 2011 15:32:26 +0000 (17:32 +0200)
samq_plot.txt
single_arch_multiple_qdiscs.sh
sqma_plot.txt
statistics.oct [new file with mode: 0755]

index 3369e56ba9f0755491c90770315a90773b2fb70f..2a5090737758c40d08f91b98f1ff5256349c3e1e 100644 (file)
@@ -1,11 +1,15 @@
 set terminal postscript color eps enhanced size 15cm,7cm lw 1 "Times-Roman" 10
-set log y
-set xrange [ 1 : 5000 ]
+#set log y
+#set xrange [ 1 : 5000 ]
 #set yrange [ 0.25 : 1000 ]
+set style data histogram
+set style histogram cluster gap 1
+set style fill solid border -1
+set boxwidth 0.9
+
 set xlabel "N-th sample"
-set ylabel "Time spent in can\\_send() function[us]"
+set ylabel "Time spent in can\\_send() function [us]"
 
-set style data lines
 set style line 1 linetype 1 linecolor rgb "black"    linewidth 1 pointtype 1 
 set style line 2 linetype 1 linecolor rgb "yellow"   linewidth 1 pointtype 1
 set style line 3 linetype 1 linecolor rgb "blue"     linewidth 1 pointtype 1
@@ -14,16 +18,11 @@ set style line 5 linetype 1 linecolor rgb "green"    linewidth 1 pointtype 1
 set style line 6 linetype 1 linecolor rgb "cyan"     linewidth 1 pointtype 1
 set style line 7 linetype 1 linecolor rgb "violet"   linewidth 1 pointtype 1
 
+set style histogram clustered
 
-#set style data points
-#set style data dots
-#set pointsize 1
 plot \
-       "ftrace_sff_pfifo1_plot.dat" ls 1 title "Default pfifo qdisc; fixed CAN ID", \
-       "ftrace_sff_pfifo2_plot.dat" ls 2 title "Default pfifo qdisc; incrementing CAN ID", \
-       "ftrace_sff_prio1_plot.dat"  ls 3 title "Prio qdisc; every frame is classified into the first class", \
-       "ftrace_sff_prio1b_plot.dat" ls 4 title "Prio qdisc; most of the traffic goes into default (last) class", \
-       "ftrace_sff_prio2_plot.dat"  ls 5 title "Prio qdisc; 5 classes, each has filter with 128 rules", \
-       "ftrace_sff_htb1_plot.dat"   ls 6 title "Simple HTB qdisc; fixed CAN ID", \
-       "ftrace_sff_htb2_plot.dat"   ls 7 title "Simple HTB qdisc; incrementing CAN ID"
-
+       "test2_plot.dat" using 2:xticlabels(1) ls 1 title "P4 PC; g = 0", \
+       "test1_plot.dat" using 2:xticlabels(1) ls 2 title "P4 PC; g = 1", \
+       "test3_plot.dat" using 2:xticlabels(1) ls 3 title "PPC; g = 0", \
+       "test4_plot.dat" using 2:xticlabels(1) ls 4 title "PPC; g = 1", \
+       "test5_plot.dat" using 2:xticlabels(1) ls 5 title "PPC; g = 2";
index 111a22c5d42dbc22a03a30c3afaa533264582c14..60718a6ee140a9b04c177103b0449b81613f1adc 100755 (executable)
@@ -1,8 +1,15 @@
 #!/bin/bash
 DIRS=(test1 test2 test3 test4 test5)
-TESTS=(ftrace_sff_pfifo1 ftrace_sff_prio1 ftrace_sff_htb1 \
-       ftrace_sff_pfifo2 ftrace_sff_prio2 ftrace_sff_htb2 \
-       ftrace_sff_prio1b)
+#DIRS=(test3)
+TESTS=( \
+ftrace_sff_pfifo1 \
+ftrace_sff_pfifo2 \
+ftrace_sff_prio1 \
+ftrace_sff_prio1b \
+ftrace_sff_prio2 \
+ftrace_sff_htb1 \
+ftrace_sff_htb2 \
+)
 
 if [ ! -d "samq" ]; then
        mkdir "samq"
@@ -15,16 +22,20 @@ do
                for Y in ${TESTS[@]:0}
                do 
                        cat "${X}/${A}/${Y}.txt" | \
-                               tail -n +5 | cut -c 7- | cut -d" " -f 1 | \
-                               cat -n > ${Y}_plot.dat
+                               tail -n +5 | cut -c 7- | cut -d" " -f 1 \
+                               > ${Y}_plot.dat
+               
+                       echo -n "\"${Y##*_}\" " >> "${X}_plot.dat"
+                       ./statistics.oct "${Y}_plot.dat" >> "${X}_plot.dat"
                done
 
                echo -n "."
-               gnuplot < samq_plot.txt > samq/plot_${A}_${X}.eps
-               epstopdf samq/plot_${A}_${X}.eps
        done
+
+       gnuplot < samq_plot.txt > samq/plot_${A}.eps
+       epstopdf samq/plot_${A}.eps
+       rm *_plot.dat
 done
 
-rm *_plot.dat
 echo
 exit 0;
index 2a2bc8006f9c8936d2646f934614d46b58efd1f6..4eba62f3c32a163b983a34707e8c90b6a8dd4d27 100644 (file)
@@ -1,11 +1,10 @@
 set terminal postscript color eps enhanced size 15cm,7cm lw 1 "Times-Roman" 10
 set log y
 set xrange [ 1 : 5000 ]
-set yrange [ 0.25 : 1000 ]
+#set yrange [ 0.25 : 1000 ]
 set xlabel "N-th sample"
 set ylabel "Time spent in can\\_send() function[us]"
 
-set style data lines
 set style line 1 linetype 1 linecolor rgb "black"    linewidth 1 pointtype 1 
 set style line 2 linetype 1 linecolor rgb "yellow"   linewidth 1 pointtype 1
 set style line 3 linetype 1 linecolor rgb "blue"     linewidth 1 pointtype 1
@@ -14,8 +13,8 @@ set style line 5 linetype 1 linecolor rgb "green"    linewidth 1 pointtype 1
 set style line 6 linetype 1 linecolor rgb "cyan"     linewidth 1 pointtype 1
 set style line 7 linetype 1 linecolor rgb "violet"   linewidth 1 pointtype 1
 
-
-#set style data points
+#set style data lines
+set style data points
 #set style data dots
 #set pointsize 1
 plot \
diff --git a/statistics.oct b/statistics.oct
new file mode 100755 (executable)
index 0000000..78df325
--- /dev/null
@@ -0,0 +1,9 @@
+#!/usr/bin/octave -qf
+
+data = load(argv(){1});
+me = mean(data);
+mx = max(data);
+mi = min(data);
+
+printf("%f %f %f\n", me, mx, mi);
+