viff

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 diff
     1.1 --- a/viff/runtime.py	Wed Oct 01 11:02:26 2008 +0200
     1.2 +++ b/viff/runtime.py	Wed Oct 01 11:02:40 2008 +0200
     1.3 @@ -41,7 +41,7 @@
     1.4  from viff import shamir
     1.5  from viff.prss import prss, prss_lsb, prss_zero
     1.6  from viff.field import GF256, FieldElement
     1.7 -from viff.util import wrapper, rand
     1.8 +from viff.util import wrapper, rand, profile
     1.9  
    1.10  from twisted.internet import reactor
    1.11  from twisted.internet.error import ConnectionDone, CannotListenError
    1.12 @@ -746,6 +746,7 @@
    1.13          if self.id in receivers:
    1.14              return result
    1.15  
    1.16 +    @profile
    1.17      def add(self, share_a, share_b):
    1.18          """Addition of shares.
    1.19  
    1.20 @@ -776,6 +777,7 @@
    1.21          result.addCallback(lambda (a, b): a - b)
    1.22          return result
    1.23  
    1.24 +    @profile
    1.25      @increment_pc
    1.26      def mul(self, share_a, share_b):
    1.27          """Multiplication of shares.