changeset 841:3f01e81fcc1a

Benchmark support for Paillier runtime.
author Martin Geisler <mg@daimi.au.dk>
date Sun, 29 Jun 2008 13:59:32 +0200
parents f7e987afbec3
children 0e9ab27bf855
files apps/benchmark.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/apps/benchmark.py	Sun Jun 29 13:59:30 2008 +0200
+++ b/apps/benchmark.py	Sun Jun 29 13:59:32 2008 +0200
@@ -65,6 +65,7 @@
 from viff.runtime import Runtime, ActiveRuntime, create_runtime, gather_shares
 from viff.comparison import Toft05Runtime, Toft07Runtime
 from viff.comparison import ActiveToft05Runtime, ActiveToft07Runtime
+from viff.paillier import PaillierRuntime
 from viff.config import load_config
 from viff.util import find_prime
 
@@ -94,7 +95,7 @@
                   help="number of operations")
 parser.add_option("-o", "--operation", type="choice",
                   choices=["mul", "mul-active", "comp", "comp-active",
-                           "compII", "compII-active"],
+                           "compII", "compII-active", "mul-paillier"],
                   help=("operation to benchmark, one of 'mul', 'mul-active', "
                         "'comp', 'comp-active', 'compII', 'compII-active'"))
 parser.add_option("-p", "--parallel", action="store_true",
@@ -251,6 +252,9 @@
 elif options.operation == "compII-active":
     operation = operator.ge
     runtime_class = ActiveToft07Runtime
+elif options.operation == "mul-paillier":
+    operation = operator.mul
+    runtime_class = PaillierRuntime
 
 if options.parallel:
     benchmark = ParallelBenchmark