viff

changeset 1284:eaf317ca1b80

Added triple_gen as operation.
author Janus Dam Nielsen <janus.nielsen@alexandra.dk>
date Fri, 16 Oct 2009 15:59:05 +0200
parents 9043758a351a
children 225b81fa2d1d
files apps/benchmark.py apps/benchmark_classes.py
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line diff
     1.1 --- a/apps/benchmark.py	Fri Oct 16 15:58:49 2009 +0200
     1.2 +++ b/apps/benchmark.py	Fri Oct 16 15:59:05 2009 +0200
     1.3 @@ -88,7 +88,8 @@
     1.4  operations = {"mul"       : ("mul", [], BinaryOperation),
     1.5                "compToft05": ("ge", [ComparisonToft05Mixin], BinaryOperation),
     1.6                "compToft07": ("ge", [ComparisonToft07Mixin], BinaryOperation),
     1.7 -              "eq"        : ("eq", [ProbabilisticEqualityMixin], BinaryOperation)}
     1.8 +              "eq"        : ("eq", [ProbabilisticEqualityMixin], BinaryOperation),
     1.9 +              "triple_gen": ("triple_gen", [], NullaryOperation)}
    1.10  
    1.11  runtimes = {"PassiveRuntime": PassiveRuntime,
    1.12              "PaillierRuntime": PaillierRuntime, 
     2.1 --- a/apps/benchmark_classes.py	Fri Oct 16 15:58:49 2009 +0200
     2.2 +++ b/apps/benchmark_classes.py	Fri Oct 16 15:59:05 2009 +0200
     2.3 @@ -20,6 +20,8 @@
     2.4  
     2.5  from pprint import pformat
     2.6  
     2.7 +from twisted.internet.defer import gatherResults
     2.8 +
     2.9  from viff.runtime import gather_shares
    2.10  from viff.util import rand
    2.11  
    2.12 @@ -114,7 +116,7 @@
    2.13              c_shares.append(self.do_operation())
    2.14              print "."
    2.15  
    2.16 -        done = gather_shares(c_shares)
    2.17 +        done = gatherResults(c_shares)
    2.18          done.addCallback(record_stop, "parallel test", self.count)
    2.19          def f(x):
    2.20              needed_data = self.rt._needed_data