]> rtime.felk.cvut.cz Git - frescor/fwp.git/commitdiff
Fixed test with more stations
authorMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 7 Jul 2008 14:59:14 +0000 (16:59 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 7 Jul 2008 14:59:14 +0000 (16:59 +0200)
wme_test/more_sta/run-wlans
wme_test/plot
wme_test/wclient.c

index 292abc217c0c6e1c933096745c43e71549590559..126b4c9613f2346cc5c8eb9029b60efecfafe147 100755 (executable)
@@ -4,13 +4,12 @@ $dest = "192.168.1.2";
 
 sub run {
     my $at = shift; 
+    my @args = @_;
+
     my ($host, $iface) = split(/\//, $run_at[$at], 2);
-    
-    @args = ();
-    push @args, ('ssh', $host) if ($host ne 'localhost');
-    push @args, ('wclient');
-    push @args, ('-I', $iface) if (defined $iface);
-    push @args, split(/ /, shift);
+    unshift @args, ('-I', $iface) if (defined $iface);
+    unshift @args, ('wclient');
+    unshift @args, ('ssh', $host) if ($host ne 'localhost');
     print "running ", join(' ', @args), "\n";
     if (fork() == 0) {
        exec(@args);
@@ -19,18 +18,17 @@ sub run {
 }
 
 
-for ($tbw=20; $tbw<=20; $tbw+=10) {
-    foreach $ac(qw/VO/) {# VI BE BK
-       $params="-B $tbw -b $ac -j 50 -s 100 -c 15";
-
+for ($tbw=10; $tbw<=30; $tbw+=5) {
+    foreach $ac(qw/VO VI BE BK/) {
        for ($i=1; $i <= @run_at; $i++) {
            $at = 0;
 
-           run($at, $params . " -o $tbw-$ac-$i-stas $dest");
+           @args = (split(/ +/,"-B $tbw -b $ac -j 50 -s 100 -c 15  $dest"), ("-C", "$i STAs"));
+           run($at, (@args, ('-o', "$tbw-$ac-$i-stas")));
            # Run first tasks at [0] and the remaining in 
            for ($j=1; $j<@run_at; $j++) {
                if ($j > @run_at - $i) { $at++; }
-               run($at, $params . " -o $tbw-$ac-$i-stas-$j $dest");
+               run($at, (@args, ('-o', "$tbw-$ac-$i-stas-$j")));
            }
            print "==================\n";
            
index 66dfdd33a197eb98795f2a57d00205ce21e321b9..871283a394e14c07d72386d933f37fc5fce63323 100755 (executable)
@@ -13,7 +13,6 @@ getopts('bd:emnso:pPt:', \%opt);
 $PLOT_SINGLE_EXPERIMENT = $opt{'m'} ? 0 : 1;
 $EXPERIMENT_TITLES = $opt{'t'};
 $PLOT_BOTH_DIRECTIONS=1 if $opt{'b'};
-$
 $DELAY_BOUND="[0:".$opt{'d'}."]" if $opt{'d'};
 $SET_TERM_TEMPLATE='set term postscript color eps enhanced; set output "${FILE}.eps"' if $opt{'e'};
 $SET_TERM_TEMPLATE='set term png enhanced; set output "${FILE}.png"' if $opt{'n'};
@@ -137,10 +136,10 @@ set style line 12 lt 3 lc rgb "magenta" lw 2
        my $t=$titles[$experiment];
        $t = '' unless $t;
        print CMD qq/plot $DELAY_BOUND [0.01:100]\\
-     "${FILE}.dat" index 0 with lines ls $ls1 title "AC\\\\_VO $t",\\
-     "${FILE}.dat" index 1 with lines ls $ls2 title "AC\\\\_VI $t",\\
-     "${FILE}.dat" index 2 with lines ls $ls3 title "AC\\\\_BE $t",\\
-     "${FILE}.dat" index 3 with lines ls $ls4 title "AC\\\\_BK $t"/;
+     "${FILE}.dat" index 0 using 1:2 with lines ls $ls1 title "AC\\\\_VO $t",\\
+     "${FILE}.dat" index 1 using 1:2 with lines ls $ls2 title "AC\\\\_VI $t",\\
+     "${FILE}.dat" index 2 using 1:2 with lines ls $ls3 title "AC\\\\_BE $t",\\
+     "${FILE}.dat" index 3 using 1:2 with lines ls $ls4 title "AC\\\\_BK $t"/;
        foreach $dat_file (@ARGV[1,2]) {
            last if (!defined $dat_file);
            $experiment++;
@@ -149,10 +148,10 @@ set style line 12 lt 3 lc rgb "magenta" lw 2
            ($FILE, , ) = fileparse($dat_file, (".dat"));
            ($ls1, $ls2, $ls3, $ls4) = map($_+4, ($ls1, $ls2, $ls3, $ls4));
            print CMD qq/,\\
-     "${FILE}.dat" index 0 with lines ls $ls1 title "AC\\\\_VO $t",\\
-     "${FILE}.dat" index 1 with lines ls $ls2 title "AC\\\\_VI $t",\\
-     "${FILE}.dat" index 2 with lines ls $ls3 title "AC\\\\_BE $t",\\
-     "${FILE}.dat" index 3 with lines ls $ls4 title "AC\\\\_BK $t"/;
+     "${FILE}.dat" index 0 using 1:2 with lines ls $ls1 title "AC\\\\_VO $t",\\
+     "${FILE}.dat" index 1 using 1:2 with lines ls $ls2 title "AC\\\\_VI $t",\\
+     "${FILE}.dat" index 2 using 1:2 with lines ls $ls3 title "AC\\\\_BE $t",\\
+     "${FILE}.dat" index 3 using 1:2 with lines ls $ls4 title "AC\\\\_BK $t"/;
        }
        print CMD "\n";
        last;
index c5b9ead925e3bf9f6611d64b2735e876826152ab..a313797191c6def42081b07a9e3ebabeaf6666c3 100644 (file)
@@ -595,7 +595,9 @@ static void create_stream_endpoint_native(struct stream *stream)
        if (ph)
                stream->rem_addr.sin_addr = *((struct in_addr *)ph->h_addr);
        else {
-               perror("Unknown server");
+               char str[100];
+               snprintf(str, sizeof(str), "gethostbyname(%s)", server_addr);
+               perror(str);
                exit(1);
        }
        stream->rem_addr.sin_port = htons(BASE_PORT + stream->ac);