[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r18109: {torflow} Fixed buildtime's exit policy restrictions and the integrati (torflow/trunk/CircuitAnalysis/BuildTimes)
Author: mikeperry
Date: 2009-01-14 18:57:14 -0500 (Wed, 14 Jan 2009)
New Revision: 18109
Modified:
torflow/trunk/CircuitAnalysis/BuildTimes/buildtimes.py
torflow/trunk/CircuitAnalysis/BuildTimes/dist_check.py
torflow/trunk/CircuitAnalysis/BuildTimes/full_run.sh
Log:
Fixed buildtime's exit policy restrictions and the
integration tests.. Hopefully they pass now?
Modified: torflow/trunk/CircuitAnalysis/BuildTimes/buildtimes.py
===================================================================
--- torflow/trunk/CircuitAnalysis/BuildTimes/buildtimes.py 2009-01-14 23:56:01 UTC (rev 18108)
+++ torflow/trunk/CircuitAnalysis/BuildTimes/buildtimes.py 2009-01-14 23:57:14 UTC (rev 18109)
@@ -55,7 +55,7 @@
# Since Tor dynamically pre-builds circuits depending on port usage, and
# these are the two most commonly used user ports, this seems as good
# first approximation to model the dynamic behavior of a real client's
- # circuit choice.
+ # circuit choice.
self.selmgr.exit_rstr.del_restriction(ExitPolicyRestriction)
self.selmgr.exit_rstr.del_restriction(OrNodeRestriction)
self.selmgr.exit_rstr.add_restriction(OrNodeRestriction([
@@ -135,7 +135,7 @@
ncircuits=None
begin=0
end=80
- slice=5
+ pslice=5
dirname=""
guard_slices = False
for o,a in opts:
@@ -150,13 +150,13 @@
if a.isdigit(): end = int(a)
else: usage()
elif o == '-s':
- if a.isdigit(): slice = int(a)
+ if a.isdigit(): pslice = int(a)
else: usage()
elif o == '-g':
guard_slices = True
else:
assert False, "Bad option"
- return guard_slices,ncircuits,begin,end,slice,dirname
+ return guard_slices,ncircuits,begin,end,pslice,dirname
def usage():
print 'usage: statscontroller.py [-b <#begin percentile>] [-e <end percentile] [-s <percentile slice size>] [-g] -n <# circuits> -d <output dir name>'
@@ -173,7 +173,11 @@
print 'Guard percentiles:',p,'to',s
print '#Circuits',ncircuits
- basefile_name = dirname + '/' + str(p) + '-' + str(s) + '.' + str(ncircuits)
+ if guard_slices:
+ basefile_name = dirname + '/' + str(p) + '-' + str(s) + 'g.' + str(ncircuits)
+ else:
+ basefile_name = dirname + '/' + str(p) + '-' + str(s) + '.' + str(ncircuits)
+
aggfile_name = basefile_name + '.agg'
# Ok, since we create a new StatsGatherer each segment..
Modified: torflow/trunk/CircuitAnalysis/BuildTimes/dist_check.py
===================================================================
--- torflow/trunk/CircuitAnalysis/BuildTimes/dist_check.py 2009-01-14 23:56:01 UTC (rev 18108)
+++ torflow/trunk/CircuitAnalysis/BuildTimes/dist_check.py 2009-01-14 23:57:14 UTC (rev 18109)
@@ -110,8 +110,11 @@
print "Exit policy:"
for e in router_map[nodes[2]].exitpolicy:
print " "+str(e)
+ print " 80: "+str(router_map[nodes[2]].will_exit_to("255.255.255.255",
+80))
+ print " 443: "+str(router_map[nodes[2]].will_exit_to("255.255.255.255", 443))
-
+
# FIXME: Compare circuits/chosen to %bw. Multiply by pct_min+max
# FIXME: Verify by guard+exit weighting?
for i in xrange(0, 3):
@@ -120,7 +123,7 @@
unchosen = 0
for r in routers:
if r.chosen[i] == 0: unchosen+=1
- else: print r.idhex+" chosen: "+str(r.chosen[i])
+ else: print r.idhex+" "+str((100.0*r.list_rank)/len(routers))+"%, chosen: "+str(r.chosen[i])
print "Nodes not chosen for this hop: "+str(unchosen)+"/"+str(len(routers))
Modified: torflow/trunk/CircuitAnalysis/BuildTimes/full_run.sh
===================================================================
--- torflow/trunk/CircuitAnalysis/BuildTimes/full_run.sh 2009-01-14 23:56:01 UTC (rev 18108)
+++ torflow/trunk/CircuitAnalysis/BuildTimes/full_run.sh 2009-01-14 23:57:14 UTC (rev 18109)
@@ -3,3 +3,10 @@
./buildtimes.py -n 10000 -s 3 -g -e 50 -d ./slices >& bt.log &
./buildtimes.py -n 10000 -s 3 -e 80 -d ./slices >& bt.log &
+# Check all slices
+for f in ./slices/*.nodes
+do
+ ./dist_check.py -f ${f} >& ${f}.check
+done
+
+mv slices slices-`date +%Y-%m-%d-%H:%M`