]> rtime.felk.cvut.cz Git - frescor/fwp.git/commitdiff
Added scripts for running and drawing saturation tests.
authorMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 21 Jan 2008 15:02:25 +0000 (16:02 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 21 Jan 2008 15:02:25 +0000 (16:02 +0100)
wme_test/sat_per_packet_size/graph [new file with mode: 0755]
wme_test/sat_per_packet_size/run [new file with mode: 0755]
wme_test/sat_per_packet_size/sat-graph [new file with mode: 0755]

diff --git a/wme_test/sat_per_packet_size/graph b/wme_test/sat_per_packet_size/graph
new file mode 100755 (executable)
index 0000000..c9eea57
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+for q in BE VI VO; do
+    ../plot -d 150 -o ${q}_packet_size_150.pdf -P ${q}_packet_size_*.dat
+    ../plot -d 2000 -o ${q}_packet_size_2000.pdf -P ${q}_packet_size_*.dat
+done
+./sat-graph
+./sat-graph -m    
+
+
+
diff --git a/wme_test/sat_per_packet_size/run b/wme_test/sat_per_packet_size/run
new file mode 100755 (executable)
index 0000000..0e62c3d
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+for i in 12 `seq 20 10 2000`
+do
+       ../wclient -q -B 100 -b VO/$i,VI,BE:500 -j 50 -s 800 -c 60 -o `printf VO_packet_size_%04d $i` 192.168.1.100
+       ../wclient -q -B 100 -b VO,VI/$i,BE:500 -j 50 -s 800 -c 60 -o `printf VI_packet_size_%04d $i` 192.168.1.100
+       ../wclient -q -B 100 -b VO,VI,BE:500/$i -j 50 -s 800 -c 60 -o `printf BE_packet_size_%04d $i` 192.168.1.100
+done
diff --git a/wme_test/sat_per_packet_size/sat-graph b/wme_test/sat_per_packet_size/sat-graph
new file mode 100755 (executable)
index 0000000..6e1ecda
--- /dev/null
@@ -0,0 +1,81 @@
+#!/usr/bin/perl -w
+
+$pdf_output=1;
+$multiple_graphs=1 if ($ARGV[0] eq "-m");
+
+#$Q=$ARGV[0] || "VI";
+
+foreach $Q (("VO", "VI", "BE")) {
+    
+    $base_name="${Q}_packet_size_";
+    $graph_data_name = "${base_name}graph";
+
+    open G, ">$graph_data_name" || die "error opening $graph_data_name";
+    foreach $f (`ls ${base_name}*.dat`) {
+       open F, $f;
+       while (<F>) {
+           if (/AC_${Q}/) {
+               ($a) = /([0-9]*) bytes/;
+               ($b)=/real: +([0-9.]+) kbps/;
+           }
+           if (/AC_BE/) {
+               ($c) = /real: +([0-9.]+) kbps/;
+               if (!$c) {
+                   ($c) = /real: +([0-9.]+) bps/;
+                   $c*=1000;
+               }
+               print G "$a $b $c\n";
+           }
+       }
+       close F;    
+    }
+    close G;
+}
+if ($pdf_output) {
+    if ($multiple_graphs) {
+       $pdf = "packet_sizes_sat.pdf";
+    } else {
+       $pdf = "packet_sizes_sat_comp.pdf";
+    }
+    open GNUPLOT, "|gnuplot|ps2pdf - $pdf";
+    print GNUPLOT "set term postscript color landscape\n";
+} else {
+    open GNUPLOT, "|gnuplot -persist";
+}
+
+print GNUPLOT <<EOF;
+#set key off
+set key right bottom nobox
+set style data linespoints
+set grid
+EOF
+
+if ($multiple_graphs) {
+    foreach $Q (("VO", "VI", "BE")) {
+       $base_name="${Q}_packet_size_";
+       $graph_data_name = "${base_name}graph";
+       
+       print GNUPLOT qq/set title "Influence of AC_$Q packet sizes to saturation bandwidth of AC_BE"\n/;
+       print GNUPLOT qq/set xlabel "AC_$Q packet sizes [bytes]"\n/;
+       print GNUPLOT qq/set ylabel "Bandwidth [kbps]"\n/;
+       print GNUPLOT qq/plot /;
+       if ($Q ne "BE") {
+           print GNUPLOT qq/"$graph_data_name" using 1:3 title "AC_BE", /;
+       }
+       print GNUPLOT qq/"$graph_data_name" using 1:2 title "AC_${Q}"\n/;
+    }
+} else {
+    print GNUPLOT qq/set title "Influence of different packet sizes to saturation bandwidth of AC_BE"\n/;
+    print GNUPLOT qq/set xlabel "Packet sizes [bytes]"\n/;
+    print GNUPLOT qq/set ylabel "AC_BE bandwidth [kbps]"\n/;
+    @plots=();
+    foreach $Q (("VO", "VI", "BE")) {
+       $base_name="${Q}_packet_size_";
+       $graph_data_name = "${base_name}graph";
+       
+       push @plots, qq/"$graph_data_name" using 1:3 title "packet size of AC_${Q} was being changed"/;
+    }
+    print GNUPLOT "plot ", join(", ", @plots), "\n";
+}
+    
+close GNUPLOT;