else
bindaddr = Address((uint32_t)INADDR_ANY,rand()%10000+7000);
- assert(0<swift::Listen(bindaddr));
+ if (swift::Listen(bindaddr)<=0) {
+ fprintf(stderr,"Cannot listen on %s\n",bindaddr.str());
+ return -3;
+ }
swift::SetTracker(tracker);
# the result is put into harvest/
#
if [ ! $SERVERS ]; then
- SERVERS="servers.txt"
+ export SERVERS="servers.txt"
fi
rm -rf harvest
# batch-size is critical for performance
LC_ALL=C sort -m -s --batch-size=64 harvest/*.fifo | gzip > harvest/swarm.log.gz &
wait
-./logreport > report.html
+./logreport > harvest/index.html
+
rm harvest/*.fifo
+cp report.css harvest
echo DONE
export SEEDER=130.161.211.198
export SEEDPORT=10004
export RUNPORT=10008
-export BRANCH=swiftapp
+export BRANCH=master
export ORIGIN=git://github.com/gritzko/swift.git
echo -ne ", '$OWDLOG' using 1:2 with lines title 'owd' "\
"axis x1y1, "\
"'$OWDLOG' using 1:3 with lines title 'min owd'"\
+ "axis x1y1, "\
+ "'$OWDLOG' using 1:($2+25000) with lines title 'target'"\
"axis x1y1 "\
>> $GP
fi
echo >> $GP
- cat $GP | gnuplot &
+ ( cat $GP | gnuplot ) &
done
done
wait
cd ..
-echo DONE
$events{"Rdata"}, $events{"Tdata"},
$events{"Rdata"}+$events{"Tdata"}, $losses;
- printf HTML
- "<tr><td colspan='3'><a href='harvest/%s-%s.png'>".
- "cwnd/data_out/rtt/owd graph</a></td></tr>\n",
- $SERVER, $host;
-
print HTML "</table>\n";
close HTML;
}
#!/bin/bash
-./loggraphs &
+./loggraphs
+
+cd harvest
echo '<html><head>'
echo '<link rel="stylesheet" href="report.css" type="text/css">'
+echo '<title>Manifold: swarm tomography</title>'
echo '</head><body>'
echo '<table id="main"><th>'
-for to in `grep -v '#' servers.txt`; do
+for to in `grep -v '#' ../$SERVERS`; do
echo '<td class="host">>'$to'</td>'
done
echo '</th>'
-for from in `grep -v '#' servers.txt`; do
+for from in `grep -v '#' ../$SERVERS`; do
echo '<tr><td class="host">'$from'></td>'
- for to in `grep -v '#' servers.txt`; do
+ for to in `grep -v '#' ../$SERVERS`; do
echo '<td>'
- cat harvest/$from-$to.html
+ cat $from-$to.html
+ PNG="$from-$to.png"
+ if [ -e $PNG ]; then
+ echo "<a href='$PNG'>"
+ echo "<img class='thumb' src='$PNG'/>"
+ echo "</a>"
+ fi
echo '</td>'
done
echo '</tr>'
done
echo '<body></html>'
-
-wait
return bin64_t::NONE;
bin64_t tosend = bin64_t::NONE;
- if (data_out_.size()<cwnd_ && last_data_out_time_<=NOW-send_interval_) {
+ tint luft = send_interval_>>2; // may wake up a bit earlier
+ if (data_out_.size()<cwnd_ && last_data_out_time_+send_interval_+luft<=NOW) {
tosend = DequeueHint();
if (tosend==bin64_t::NONE) {
dprintf("%s #%u sendctrl no idea what to send\n",tintstr(),id_);
SwitchSendControl(KEEP_ALIVE_CONTROL);
}
} else
- dprintf("%s #%u sendctrl no cwnd\n",tintstr(),id_);
+ dprintf("%s #%u sendctrl wait cwnd %f data_out %i next %s\n",
+ tintstr(),id_,cwnd_,data_out_.size(),tintstr(last_data_out_time_+NOW-send_interval_));
if (tosend==bin64_t::NONE)// && (last_data_out_time_>NOW-TINT_SEC || data_out_.empty()))
return bin64_t::NONE; // once in a while, empty data is sent just to check rtt FIXED