Channel graphs are prettified.
CPPPATH=~/include LIBPATH=~/lib scons -j4 || exit 7
echo testing
tests/connecttest || exit 8
+
+# TODO: one method
+if [ ! -e bin ]; then mkdir bin; fi
+g++ -I. *.cpp compat/*.cpp ext/seq_picker.cpp -pg -o bin/swift-pg &
+g++ -I. *.cpp compat/*.cpp ext/seq_picker.cpp -g -o bin/swift-dbg &
+g++ -I. *.cpp compat/*.cpp ext/seq_picker.cpp -O3 -o bin/swift-o3 &
+wait
+
echo done
+if [ -e .netem-on ]; then
+ sudo tc qdisc del dev `cat .netem-on` root
+ rm .netem-on
+fi
+sudo iptables -F &
cd swift
-rm -f chunk core lout lerr
+rm -f chunk core
killall leecher
killall seeder
-if [ -e .netem-iface ]; then
- sudo tc qdisc del dev `cat .netem-iface` root
- rm .netem-iface
-fi
+killall swift-o3
+killall swift-dbg
echo DONE
cd swift || exit 1
+if [ ! -d bin ]; then mkdir bin; fi
git pull || exit 2
-rm exec/*-pg exec/*-o3
-
-g++ -I. exec/leecher.cpp *.cpp compat/*.cpp ext/seq_picker.cpp -pg -o exec/leecher-pg &
-g++ -I. exec/seeder.cpp *.cpp compat/*.cpp ext/seq_picker.cpp -pg -o exec/seeder-pg &
-g++ -I. exec/leecher.cpp *.cpp compat/*.cpp ext/seq_picker.cpp -O3 -o exec/leecher-o3 &
-g++ -I. exec/seeder.cpp *.cpp compat/*.cpp ext/seq_picker.cpp -O3 -o exec/seeder-o3 &
+rm bin/swift-pg bin/swift-o3 bin/swift-dbg
+g++ -I. *.cpp compat/*.cpp ext/seq_picker.cpp -pg -o bin/swift-pg &
+g++ -I. *.cpp compat/*.cpp ext/seq_picker.cpp -g -o bin/swift-dbg &
+g++ -I. *.cpp compat/*.cpp ext/seq_picker.cpp -O3 -o bin/swift-o3 &
wait
-
-cd exec
-
-if [ ! -e leecher-pg ]; then exit 3; fi
-if [ ! -e leecher-o3 ]; then exit 4; fi
-if [ ! -e seeder-pg ]; then exit 5; fi
-if [ ! -e seeder-o3 ]; then exit 6; fi
-
+if [ ! -e bin/swift-pg ]; then exit 4; fi
+if [ ! -e bin/swift-dbg ]; then exit 5; fi
+if [ ! -e bin/swift-o3 ]; then exit 6; fi
fi
if [ ! -d logs ]; then mkdir logs; fi
+if [ ! -e $SHSC ]; then
+ echo $HOST $CMD EMPTY
+ exit 0
+fi
if ( cat $ENV $SHSC | ssh $HOST ) > logs/$HOST.$CMD.out 2> logs/$HOST.$CMD.err; then
echo $HOST $CMD OK
done
for s in `grep -v '#' $SERVERS`; do
- (if ssh $s "cat ./swift/lout.gz" | gunzip | \
- ./logparse $s \
- > harvest/$s.fifo ; then
+ (if ssh $s \
+ "cd swift/ && \
+ rm -rf harvest && mkdir harvest && \
+ ( zcat lout.gz | ./mfold/logparse $s | gzip )" \
+ | gunzip > harvest/$s.fifo ; then
+
+ ssh $s "cd swift/; tar cz harvest" | tar xz
echo $s harvest OK
+
else
echo $s harvest FAIL
fi) &
# batch-size is critical for performance
LC_ALL=C sort -m -s --batch-size=64 harvest/*.fifo | gzip > harvest/swarm.log.gz &
wait
+./loggraphs
./logreport > harvest/index.html
rm harvest/*.fifo
--- /dev/null
+#!/bin/bash
+
+while true; do
+ rm logs/*status.out
+ ( ./doall status > /dev/null ) &
+ wait
+ clear
+ cat logs/*status.out | sort
+done
cd harvest
+HEAD=`head -1 *.log | grep -v '^$' | cut -f1 | sort | head -1`
+TAIL=`tail -n1 -q *.log | grep -v '^$' | cut -f1 | sort | tail -n1 -q`
+
for from in `grep -v '^#' ../$SERVERS`; do
for to in `grep -v '^#' ../$SERVERS`; do
CWNDLOG="$from-$to-cwnd.log"
echo "set y2label 'packets'" >> $GP
echo "set ylabel 'microseconds'" >> $GP
echo "set xlabel 'run time millis'" >> $GP
+ #echo "set xrange [$HEAD:$TAIL]" >> $GP
CWNDLOG="$from-$to-cwnd.log"
- echo -ne "plot '$CWNDLOG' using 1:2 with lines title 'cwnd'"\
+ echo -ne "plot '$CWNDLOG' using 1:2 with lines lt rgb '#00aa00' title 'cwnd'"\
" axis x1y2, "\
- " '$CWNDLOG' using 1:3 with lines title 'data out'"\
+ " '$CWNDLOG' using 1:3 with lines lt rgb '#99ff99' title 'data out'"\
" axis x1y2 "\
>> $GP
RTTLOG="$from-$to-rtt.log"
if [ -e $RTTLOG ]; then
- echo -ne ", '$RTTLOG' using 1:2 with lines title 'rtt' "\
+ echo -ne ", '$RTTLOG' using 1:2 with lines lt rgb '#2833ff' title 'rtt' "\
"axis x1y1, "\
- "'$RTTLOG' using 1:3 with lines title 'dev' "\
+ "'$RTTLOG' using 1:3 with lines lt rgb '#8844ff' title 'dev' "\
"axis x1y1"\
>> $GP
fi
OWDLOG="$from-$to-owd.log"
if [ -e $OWDLOG ]; then
- echo -ne ", '$OWDLOG' using 1:2 with lines title 'owd' "\
+ echo -ne ", '$OWDLOG' using 1:2 with lines lt rgb '#8800ee' title 'owd' "\
"axis x1y1, "\
- "'$OWDLOG' using 1:3 with lines title 'min owd'"\
+ "'$OWDLOG' using 1:3 with lines lw 2 lt rgb '#0044cc' title 'min owd'"\
"axis x1y1, "\
- "'$OWDLOG' using 1:($2+25000) with lines title 'target'"\
+ "'$OWDLOG' using 1:(\$3+25000) with lines lw 2 lt rgb '#0000ff' title 'target'"\
"axis x1y1 "\
>> $GP
fi
+ RDATALOG="$from-$to-rdata.log"
+ if [ -e $RDATALOG ]; then
+ echo -ne ", '$RDATALOG' using 1:(1) with points "\
+ "lt rgb '#0f0000' title 'r-losses'"\
+ >> $GP
+ fi
+ TDATALOG="$from-$to-tdata.log"
+ if [ -e $TDATALOG ]; then
+ echo -ne ", '$TDATALOG' using 1:(1) with points "\
+ "lt rgb '#ff0000' title 't-losses'"\
+ >> $GP
+ fi
echo >> $GP
( cat $GP | gnuplot ) &
done
%CWNDLOG = ();
%RTTLOG = ();
%OWDLOG = ();
+%TDATALOG = ();
+%RDATALOG = ();
$SENTB = 0;
$RCVDB = 0;
}
print {$RTTLOG{$host}} "$ms\t$1\t$2\n";
}
+ } elsif ($event eq "Tdata") {
+ if (not exists $TDATALOG{$host}) {
+ open(my $handle, '>', "harvest/$SERVER-$host-tdata.log") or die;
+ $TDATALOG{$host} = $handle;
+ }
+ print {$TDATALOG{$host}} "$ms\n";
+ } elsif ($event eq "Rdata") {
+ if (not exists $RDATALOG{$host}) {
+ open(my $handle, '>', "harvest/$SERVER-$host-rdata.log") or die;
+ $RDATALOG{$host} = $handle;
+ }
+ print {$RDATALOG{$host}} "$ms\n";
}
$EVENTS{"$host"} = { "+hs"=>0 } if not exists $EVENTS{"$host"};
for $host (keys %RTTLOG) {
close ($RTTLOG{$host});
}
+for $host (keys %TDATALOG) {
+ close ($TDATALOG{$host});
+}
+for $host (keys %RDATALOG) {
+ close ($RDATALOG{$host});
+}
+
open(LEGEND,"> harvest/$SERVER-legend.txt") or die;
for $channel (keys %CHANN) {
#!/bin/bash
-./loggraphs
-
cd harvest
echo '<html><head>'
# env variables are set in env.default.sh
HASH=66b9644bb01eaad09269354df00172c8a924773b
-sleep 1
ulimit -c 1024000
cd swift || exit 1
rm -f core
rm -f chunk
-#valgrind --leak-check=yes \
-./exec/leecher $HASH chunk $SEEDER:$SEEDPORT 0.0.0.0:$RUNPORT 2>lerr | gzip > lout.gz || exit 2
+sleep $(( $RANDOM % 5 ))
+bin/swift-dbg -w -h $HASH -f chunk -t $SEEDER:$SEEDPORT \
+ -l 0.0.0.0:$RUNPORT -p -D 2>lerr | gzip > lout.gz || exit 2
wget -c http://video.ted.com/talks/podcast/ScottKim_2008P.mp4 || exit 1
fi
-(./exec/seeder ScottKim_2008P.mp4 0.0.0.0:$SEEDPORT \
- 2> lerr | gzip > lout.gz ) >/dev/null 2> /dev/null &
-
+bin/swift-dbg -w -f ScottKim_2008P.mp4 -p -D \
+ -l 0.0.0.0:$SEEDPORT 2>lerr | gzip > lout.gz || exit 2
exit