5 while [ ! -e Makefile.rules ]; do
6 if [ "$old_pwd" = `pwd` ]; then
7 echo "Makefile.rules has not been found in this or parent directory" >&2; exit 1;
18 die "Somebody sent me a SIG$signame";
20 $SIG{INT} = \&catch_zap;
21 $SIG{TERM} = \&catch_zap;
24 "-s 192.168.1.10 -d 192.168.1.11",
25 "-s 192.168.1.11 -d 192.168.1.12",
26 "-s 192.168.1.12 -d 192.168.1.13",
27 "-s 192.168.1.13 -d 192.168.1.10",
31 $max=$ARGV[0] if (scalar(@ARGV));
33 for($i=1; $i<=$max; $i++) {
38 for ($j=0; $j<@srcdst; $j++) {
40 my $n = ($i-1) / @srcdst + ((($j % @srcdst) <= (($i-1) % @srcdst)) ? 1 : 0);
41 $streams[$j] = $srcdst[$j]." -n $n" if ($n);
43 $cmd="$omk_rules_dir/_compiled/bin-tests/fwp-timing -l 2 -q -c 1000 ".join(" -/ ", @streams);
49 @result = $out =~ /Max: *([0-9.]+).*Packetloss: *([0-9.]+).*90%: *([0-9.]+)/;
53 $results[$i] = \@result;
56 # Print data for gnuplot
57 open(DAT, ">", "fwp-timing.dat");
58 for($i=1; $i<=$max; $i++) {
59 my $line = "$i ".join(" ", @{$results[$i]})."\n";