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

[minion-cvs] reflect changes to buildForwardPacket interface



Update of /home/minion/cvsroot/src/minion/lib/mixminion
In directory moria.mit.edu:/tmp/cvs-serv12157/lib/mixminion

Modified Files:
	benchmark.py 
Log Message:
reflect changes to buildForwardPacket interface

Index: benchmark.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/benchmark.py,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- benchmark.py	21 Aug 2003 21:34:03 -0000	1.47
+++ benchmark.py	10 Nov 2003 04:04:35 -0000	1.48
@@ -23,7 +23,7 @@
 import mixminion._minionlib as _ml
 import mixminion.server.ServerQueue
 
-from mixminion.BuildMessage import _buildHeader, buildForwardMessage, \
+from mixminion.BuildMessage import _buildHeader, buildForwardPacket, \
      compressData, uncompressData, encodeMessage, decodePayload
 from mixminion.Common import secureDelete, installSIGCHLDHandler, \
      waitForChildren, formatBase64, Lockfile
@@ -460,10 +460,12 @@
     bh(8,20)
     bh(16,10)
 
+    payload = encodeMessage(payload, 0)[0]
+
     def bm(np1,np2,it,serverinfo=serverinfo,payload=payload):
         tm = timeit_( \
               lambda np1=np1,np2=np2,it=it,serverinfo=serverinfo,
-                      payload=payload: buildForwardMessage(payload,
+                      payload=payload: buildForwardPacket(payload,
                                                500,
                                                "Hello",
                                                serverinfo[:np1],
@@ -553,13 +555,14 @@
     server = FakeServerInfo("127.0.0.1", 1, pk, "X"*20)
     sp = PacketHandler([pk], [DummyLog()])
 
-    m_noswap = buildForwardMessage("Hello world", SMTP_TYPE, "f@invalid",
-                                   [server, server], [server, server])
+    payload = encodeMessage("Hello world",0)[0]
+    m_noswap = buildForwardPacket(payload, SMTP_TYPE, "f@invalid",
+                                  [server, server], [server, server])
 
     print "Server process (no swap, no log)", timeit(
         lambda sp=sp, m_noswap=m_noswap: sp.processMessage(m_noswap), 100)
 
-    m_swap = buildForwardMessage("Hello world", SMTP_TYPE, "f@invalid",
+    m_swap = buildForwardPacket(payload, SMTP_TYPE, "f@invalid",
                                  [server], [server, server])
 
     print "Server process (swap, no log)", timeit(
@@ -665,8 +668,9 @@
     server = FakeServerInfo("127.0.0.1", 1, pk, "X"*20)
     sp = PacketHandler([pk], [DummyLog()])
 
-    m_noswap = buildForwardMessage("Hello world", SMTP_TYPE, "f@invalid",
-                                   [server, server], [server, server])
+    payload = encodeMessage("Hello world",0)[0]
+    m_noswap = buildForwardPacket(payload, SMTP_TYPE, "f@invalid",
+                                  [server, server], [server, server])
 
     sp_ns = timeit_(
         lambda sp=sp, m_noswap=m_noswap: sp.processMessage(m_noswap), 100)
@@ -1007,6 +1011,7 @@
     if 0:
         timeEfficiency()
         return
+
     fecTiming()    
     cryptoTiming()
     rsaTiming()