changeset 988:6612f982d5e2

Add profiling decorator to add and mul methods.
author Martin Geisler <mg@daimi.au.dk>
date Wed, 01 Oct 2008 11:02:40 +0200
parents 909c5df8e5a1
children 1d6860a2534f
files viff/runtime.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/viff/runtime.py	Wed Oct 01 11:02:26 2008 +0200
+++ b/viff/runtime.py	Wed Oct 01 11:02:40 2008 +0200
@@ -41,7 +41,7 @@
 from viff import shamir
 from viff.prss import prss, prss_lsb, prss_zero
 from viff.field import GF256, FieldElement
-from viff.util import wrapper, rand
+from viff.util import wrapper, rand, profile
 
 from twisted.internet import reactor
 from twisted.internet.error import ConnectionDone, CannotListenError
@@ -746,6 +746,7 @@
         if self.id in receivers:
             return result
 
+    @profile
     def add(self, share_a, share_b):
         """Addition of shares.
 
@@ -776,6 +777,7 @@
         result.addCallback(lambda (a, b): a - b)
         return result
 
+    @profile
     @increment_pc
     def mul(self, share_a, share_b):
         """Multiplication of shares.