[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r17881: {torflow} Add new command to metatroller to indicate we should close a (torflow/trunk)
Author: mikeperry
Date: 2009-01-04 12:57:06 -0500 (Sun, 04 Jan 2009)
New Revision: 17881
Modified:
torflow/trunk/metatroller.py
torflow/trunk/speedracer.pl
Log:
Add new command to metatroller to indicate we should close all circuits for
the end of a speedracer run.
Modified: torflow/trunk/metatroller.py
===================================================================
--- torflow/trunk/metatroller.py 2009-01-04 17:56:40 UTC (rev 17880)
+++ torflow/trunk/metatroller.py 2009-01-04 17:57:06 UTC (rev 17881)
@@ -197,6 +197,10 @@
s.write("510 Argument expected\r\n")
elif command == "GUARDNODES":
s.write("250 OK\r\n")
+ elif command == "CLOSEALLCIRCS":
+ def notlambda(this): this.close_all_circuits()
+ h.schedule_immediate(notlambda)
+ s.write("250 OK\r\n")
elif command == "SAVESTATS":
if arg: filename = arg
else: filename="./data/stats/stats-"+time.strftime("20%y-%m-%d-%H:%M:%S")
Modified: torflow/trunk/speedracer.pl
===================================================================
--- torflow/trunk/speedracer.pl 2009-01-04 17:56:40 UTC (rev 17880)
+++ torflow/trunk/speedracer.pl 2009-01-04 17:57:06 UTC (rev 17881)
@@ -14,9 +14,9 @@
# http://bitter.stalin.se/torfile
# http://www.sigma.su.se/~who/torfile
my $URL = "https://svn.torproject.org/svn/tor/trunk/doc/design-paper/tor-design.pdf";
-my $COUNT = 200;
+my $COUNT = 2;
my $START_PCT = 0;
-my $STOP_PCT = 80;
+my $STOP_PCT = 20;
my $PCT_STEP = 5;
my $DOUBLE_FETCH = 0;
my $CURL_PROXY="--socks4a 127.0.0.1:9060";
@@ -246,6 +246,9 @@
plog "DEBUG", "Reset stats\n";
speedrace($mcp, $pct, $pct+$PCT_STEP);
plog "DEBUG", "speedroced\n";
+ print $mcp "CLOSEALLCIRCS\r\n";
+ $line = <$mcp>;
+ die "Error on CLOSEALLCIRCS: $line" if (not $line =~ /^250/);
print $mcp "SAVESTATS ./data/speedraces/stats-$pct:".($pct+$PCT_STEP)."\r\n";
$line = <$mcp>;
die "Error on SAVESTATS: $line" if (not $line =~ /^250/);