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 wrap: on
line diff
--- a/apps/benchmark.py	Fri Oct 16 15:58:49 2009 +0200
+++ b/apps/benchmark.py	Fri Oct 16 15:59:05 2009 +0200
@@ -88,7 +88,8 @@
 operations = {"mul"       : ("mul", [], BinaryOperation),
               "compToft05": ("ge", [ComparisonToft05Mixin], BinaryOperation),
               "compToft07": ("ge", [ComparisonToft07Mixin], BinaryOperation),
-              "eq"        : ("eq", [ProbabilisticEqualityMixin], BinaryOperation)}
+              "eq"        : ("eq", [ProbabilisticEqualityMixin], BinaryOperation),
+              "triple_gen": ("triple_gen", [], NullaryOperation)}
 
 runtimes = {"PassiveRuntime": PassiveRuntime,
             "PaillierRuntime": PaillierRuntime, 
--- a/apps/benchmark_classes.py	Fri Oct 16 15:58:49 2009 +0200
+++ b/apps/benchmark_classes.py	Fri Oct 16 15:59:05 2009 +0200
@@ -20,6 +20,8 @@
 
 from pprint import pformat
 
+from twisted.internet.defer import gatherResults
+
 from viff.runtime import gather_shares
 from viff.util import rand
 
@@ -114,7 +116,7 @@
             c_shares.append(self.do_operation())
             print "."
 
-        done = gather_shares(c_shares)
+        done = gatherResults(c_shares)
         done.addCallback(record_stop, "parallel test", self.count)
         def f(x):
             needed_data = self.rt._needed_data