viff

changeset 906:fb42b645ca5b

Small code cleanup in benchmark.py.
author Martin Geisler <mg@daimi.au.dk>
date Mon, 15 Sep 2008 14:30:20 +0200
parents cecc84b0be9f
children c898cac3f98a
files apps/benchmark.py
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line diff
     1.1 --- a/apps/benchmark.py	Mon Sep 15 13:26:29 2008 +0200
     1.2 +++ b/apps/benchmark.py	Mon Sep 15 14:30:20 2008 +0200
     1.3 @@ -88,23 +88,23 @@
     1.4      print "*" * 6
     1.5  
     1.6  
     1.7 +operations = ["mul", "mul-active", "comp", "comp-active",
     1.8 +              "compII", "compII-active", "mul-paillier"]
     1.9 +
    1.10  parser = OptionParser()
    1.11  parser.add_option("-m", "--modulus",
    1.12                    help="lower limit for modulus (can be an expression)")
    1.13  parser.add_option("-c", "--count", type="int",
    1.14                    help="number of operations")
    1.15 -parser.add_option("-o", "--operation", type="choice",
    1.16 -                  choices=["mul", "mul-active", "comp", "comp-active",
    1.17 -                           "compII", "compII-active", "mul-paillier"],
    1.18 -                  help=("operation to benchmark, one of 'mul', 'mul-active', "
    1.19 -                        "'comp', 'comp-active', 'compII', 'compII-active'"))
    1.20 +parser.add_option("-o", "--operation", type="choice", choices=operations,
    1.21 +                  help="operation to benchmark")
    1.22  parser.add_option("-p", "--parallel", action="store_true",
    1.23                    help="execute operations in parallel")
    1.24  parser.add_option("-s", "--sequential", action="store_false", dest="parallel",
    1.25                    help="execute operations in sequence")
    1.26  
    1.27  parser.set_defaults(modulus="30916444023318367583", count=10,
    1.28 -                    operation="mul", parallel=True)
    1.29 +                    operation=operations[0], parallel=True)
    1.30  
    1.31  # Add standard VIFF options.
    1.32  Runtime.add_options(parser)