From: Michal Sojka Date: Mon, 7 Jul 2008 14:59:14 +0000 (+0200) Subject: Fixed test with more stations X-Git-Url: https://rtime.felk.cvut.cz/gitweb/frescor/fwp.git/commitdiff_plain/71385ad2883f0b60851aee74245e4e36b1d91a24 Fixed test with more stations --- diff --git a/wme_test/more_sta/run-wlans b/wme_test/more_sta/run-wlans index 292abc2..126b4c9 100755 --- a/wme_test/more_sta/run-wlans +++ b/wme_test/more_sta/run-wlans @@ -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"; diff --git a/wme_test/plot b/wme_test/plot index 66dfdd3..871283a 100755 --- a/wme_test/plot +++ b/wme_test/plot @@ -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; diff --git a/wme_test/wclient.c b/wme_test/wclient.c index c5b9ead..a313797 100644 --- a/wme_test/wclient.c +++ b/wme_test/wclient.c @@ -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);