[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[freehaven-cvs] More results



Update of /home/freehaven/cvsroot/doc/e2e-traffic/src
In directory moria.mit.edu:/tmp/cvs-serv15704/src

Modified Files:
	analyze.py postproc.py 
Log Message:
More results

Index: analyze.py
===================================================================
RCS file: /home/freehaven/cvsroot/doc/e2e-traffic/src/analyze.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- analyze.py	17 Jan 2004 19:12:39 -0000	1.1
+++ analyze.py	17 Jan 2004 22:21:19 -0000	1.2
@@ -46,7 +46,7 @@
                   self.STRATEGIES[test['aliceStrategy']])
     def disp(self):
         b,N,m,pM,strat=self.p
-        return "b:%4d N:%7d m:%4d pM:%2s%% %3s"%(b,N,m,pM,strat)
+        return "b:%4d N:%7d m:%4d pM:%2s%% S:%3s"%(b,N,m,pM,strat)
     def getM(self):
         return self.p[2]
     def getPMsg(self):
@@ -97,8 +97,10 @@
         nRounds = self.nRounds
         nRoundsAlice = self.nRoundsAlice
         nGuessed = self.nGuessed
+        xth = 0
         try:
             while 1:
+                xth += 1
                 testline = next() #UnkBGBatchTrial(...)
                 next() # "x/100"
                 resultline = next() # Result(...)
@@ -108,9 +110,10 @@
                     resultline = next()
                 next() # empty
                 if not (testline and resultline): break
+                if not resultline.startswith("Result"):
+                    print xth,"Bad result line:",resultline
                 params = eval(testline, scope)
                 result = eval(resultline, scope)
-
                 try:
                     nTrials[params]+=1
                 except KeyError:
@@ -130,6 +133,8 @@
                 #    print i, (time.time()-start)/i
         except StopIteration:
             pass
+        except SyntaxError:
+            print xth
     
     def display(self):
         params = self.nTrials.keys()

Index: postproc.py
===================================================================
RCS file: /home/freehaven/cvsroot/doc/e2e-traffic/src/postproc.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- postproc.py	17 Jan 2004 20:18:58 -0000	1.1
+++ postproc.py	17 Jan 2004 22:21:19 -0000	1.2
@@ -21,7 +21,7 @@
         for item in items:
             c = item.split(":")
             if len(c) == 2:
-                if c[0] == xvar:
+                if c[0] == xvar and xval is None:
                     xval = float(c[1])
                 elif c[0] == yvar:
                     yval = float(c[1])

***********************************************************************
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe freehaven-cvs       in the body. http://freehaven.net/