From 311571ea862535f9f6948991227b2fef862a7ad8 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Mon, 3 Oct 2011 03:17:14 +0200 Subject: [PATCH 1/1] Try put more information to the graph --- samq_plot.txt | 28 +++++++++++++++++----------- single_arch_multiple_qdiscs.sh | 12 ++++++++---- sqma_plot.txt | 1 + statistics.oct | 7 ++++--- 4 files changed, 30 insertions(+), 18 deletions(-) diff --git a/samq_plot.txt b/samq_plot.txt index f0f66d5..6aeba4f 100644 --- a/samq_plot.txt +++ b/samq_plot.txt @@ -1,14 +1,15 @@ -set terminal postscript color eps enhanced size 8cm,4cm lw 1 "Times-Roman" 10 +set terminal pdfcairo enhanced size 8cm,4cm lw 1 font "Times-Roman,4pt" +set output 'plot.pdf' #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 grid +set key left reverse Left set xlabel "Different configurations of qdiscs and cangen" -set ylabel "Time spent in can\\_send() function [us]" +set ylabel "Time spent in can\\_send() function [{/Symbol m}s]" +# set y2label "Time spent in can\\_send() function [{/Symbol m}s]" 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 @@ -18,11 +19,16 @@ 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 histogram errorbars gap 1 lw 2 +set bars fullwidth + +set yrange [0:200] +# set y2range [0:30] +# set y2tics plot \ - "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 "MPC5200 PPC; g = 0", \ - "test4_plot.dat" using 2:xticlabels(1) ls 4 title "MPC5200 PPC; g = 1", \ - "test5_plot.dat" using 2:xticlabels(1) ls 5 title "MPC5200 PPC; g = 2"; + "test2_plot.dat" using 2:4:6 :xticlabels(1) ls 1 axes x1y1 title "P4; 0 ms", \ + "test1_plot.dat" using 2:4:6:xticlabels(1) ls 2 axes x1y1 title "P4; 1 ms", \ + "test3_plot.dat" using 2:4:6:xticlabels(1) ls 3 axes x1y1 title "MPC5200; 0 ms", \ + "test4_plot.dat" using 2:4:6:xticlabels(1) ls 4 axes x1y1 title "MPC5200; 1 ms", \ + "test5_plot.dat" using 2:4:6:xticlabels(1) ls 5 axes x1y1 title "MPC5200; 2 ms"; diff --git a/single_arch_multiple_qdiscs.sh b/single_arch_multiple_qdiscs.sh index 4239ebf..567c716 100755 --- a/single_arch_multiple_qdiscs.sh +++ b/single_arch_multiple_qdiscs.sh @@ -17,6 +17,9 @@ fi for A in "sff_array" "sff_bitmap" do + export A + mkdir -p samq/$A + rm -rf samq/$A/*_plot.dat for X in ${DIRS[@]:0} do for Y in ${TESTS[@]:0} @@ -25,16 +28,17 @@ do 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" + { + echo -n "\"${Y##*_}\" "; + ./statistics.oct "${Y}_plot.dat" + } >> "samq/$A/${X}_plot.dat" done echo -n "." #cp "${X}_plot.dat" samq/"${X}_plot.dat" done - gnuplot < samq_plot.txt > samq/plot_${A}.eps - epstopdf samq/plot_${A}.eps + ln -sf ../../samq_plot.txt samq/$A/plot_${A}.gp rm *_plot.dat done diff --git a/sqma_plot.txt b/sqma_plot.txt index 2611b46..32d3c57 100644 --- a/sqma_plot.txt +++ b/sqma_plot.txt @@ -4,6 +4,7 @@ set xrange [ 1 : 5000 ] #set yrange [ 0.25 : 1000 ] set xlabel "N-th sample" set ylabel "Time spent in can\\_send() function[us]" +set grid 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 diff --git a/statistics.oct b/statistics.oct index 78df325..1958e97 100755 --- a/statistics.oct +++ b/statistics.oct @@ -1,9 +1,10 @@ #!/usr/bin/octave -qf data = load(argv(){1}); -me = mean(data); +me = quantile(data, 0.50); #mean(data); +sd = std(data); mx = max(data); mi = min(data); +p90 = quantile(data, 0.90); -printf("%f %f %f\n", me, mx, mi); - +printf("%f %f %f %f %f\n", me, mx, mi, sd, p90); -- 2.39.2