/rev/6952e7a560f8
changeset: 1293:6952e7a560f8
user:      Martin Geisler <[email protected]>
date:      Fri Oct 16 19:08:46 2009 +0200
summary:   benchmark: wrapped long string literals and docstrings

diffstat:

 apps/benchmark.py         |  13 ++++++++++---
 apps/benchmark_classes.py |  15 +++++++++------
 2 files changed, 19 insertions(+), 9 deletions(-)

diffs (71 lines):

diff -r 9c49d09e2dac -r 6952e7a560f8 apps/benchmark.py
--- a/apps/benchmark.py Fri Oct 16 19:04:04 2009 +0200
+++ b/apps/benchmark.py Fri Oct 16 19:08:46 2009 +0200
@@ -128,11 +128,18 @@
 parser.add_option("-f", "--fake", action="store_true",
                   help="skip local computations using fake field elements")
 parser.add_option("--args", type="string",
-                  help="additional arguments to the runtime, the format is a 
comma separated list of id=value pairs e.g. --args s=1,d=0,lambda=1")
+                  help=("additional arguments to the runtime, the format is "
+                        "a comma separated list of id=value pairs e.g. "
+                        "--args s=1,d=0,lambda=1"))
 parser.add_option("--needed_data", type="string",
-                  help="name of a file containing already computed dictionary 
of needed_data. Useful for skipping generating the needed data, which usually 
elliminates half the execution time. Format of file: \"{('random_triple', 
(Zp,)): [(3, 1), (3, 4)]}\"")
+                  help=("name of a file containing already computed "
+                        "dictionary of needed_data. Useful for skipping "
+                        "generating the needed data, which usually "
+                        "elliminates half the execution time. Format of file: "
+                        "\"{('random_triple', (Zp,)): [(3, 1), (3, 4)]}\""))
 parser.add_option("--pc", type="string",
-                  help="The program counter to start from when using 
explicitly provided needed_data. Format: [3,0]")
+                  help=("The program counter to start from when using "
+                        "explicitly provided needed_data. Format: [3,0]"))
 
 parser.set_defaults(modulus=2**65, threshold=1, count=10,
                     runtime="PassiveRuntime", mixins="", num_players=2, 
prss=True,
diff -r 9c49d09e2dac -r 6952e7a560f8 apps/benchmark_classes.py
--- a/apps/benchmark_classes.py Fri Oct 16 19:04:04 2009 +0200
+++ b/apps/benchmark_classes.py Fri Oct 16 19:08:46 2009 +0200
@@ -47,8 +47,9 @@
 class Benchmark(object):
     """Abstract base class for all Benchmarks.
 
-    For concrete classes see the `ParallelBenchmark` and `SequentialBenchmark` 
classes.
-    A concrete class must be mixed with a `BenchmarkStrategy` and an 
`Operator`.
+    For concrete classes see the `ParallelBenchmark` and
+    `SequentialBenchmark` classes. A concrete class must be mixed with
+    a `BenchmarkStrategy` and an `Operator`.
     """
 
     def __init__(self, rt, operation, field, count):
@@ -127,7 +128,8 @@
 
 
 class SequentialBenchmark(Benchmark):
-    """A benchmark where the operations are executed one after each other."""
+    """A benchmark where the operations are executed one after each
+    other."""
 
     def run_test(self, _, termination_function, d):
         record_start("sequential test")
@@ -222,7 +224,8 @@
 
 
 class SelfcontainedBenchmarkStrategy(BenchmarkStrategy):
-    """In a self contained benchmark strategy, all the needed data is 
generated on the fly."""
+    """In a self contained benchmark strategy, all the needed data is
+    generated on the fly."""
 
     def benchmark(self, *args):
         sys.stdout.flush()
@@ -233,8 +236,8 @@
 
 
 class NeededDataBenchmarkStrategy(BenchmarkStrategy):
-    """In a needed data benchmark strategy, all the needed data has to have 
been generated
-    before the test is run."""
+    """In a needed data benchmark strategy, all the needed data has to
+    have been generated before the test is run."""
 
     def benchmark(self, needed_data, pc, *args):
         self.pc = pc
_______________________________________________
viff-commits mailing list
[email protected]
http://lists.viff.dk/listinfo.cgi/viff-commits-viff.dk

Reply via email to