/rev/9043758a351a
changeset: 1283:9043758a351a
user:      Janus Dam Nielsen <[email protected]>
date:      Fri Oct 16 15:58:49 2009 +0200
summary:   Moved creation of preruntime up before benchmark instantiation.

diffstat:

 apps/benchmark.py |  30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)

diffs (47 lines):

diff -r 7265daadaa63 -r 9043758a351a apps/benchmark.py
--- a/apps/benchmark.py Fri Oct 16 15:57:56 2009 +0200
+++ b/apps/benchmark.py Fri Oct 16 15:58:49 2009 +0200
@@ -190,6 +190,21 @@
 
 runtime_class = make_runtime_class(base_runtime_class, actual_mixins)
 
+pre_runtime = create_runtime(id, players, options.threshold,
+                             options, runtime_class)
+
+def update_args(runtime, options):
+    args = {}
+    if options.args != "":
+        for arg in options.args.split(','):
+            id, value = arg.split('=')
+            args[id] = long(value)
+        runtime.set_args(args)
+    return runtime
+
+
+pre_runtime.addCallback(update_args, options)
+
 if options.parallel:
     benchmark = ParallelBenchmark
 else:
@@ -211,21 +226,6 @@
 print "Using the Benchmark bases: ", bases
 benchmark = type("ExtendedBenchmark", bases, {})
 
-pre_runtime = create_runtime(id, players, options.threshold,
-                             options, runtime_class)
-
-def update_args(runtime, options):
-    args = {}
-    if options.args != "":
-        for arg in options.args.split(','):
-            id, value = arg.split('=')
-            args[id] = long(value)
-        runtime.set_args(args)
-    return runtime
-
-
-pre_runtime.addCallback(update_args, options)
-
 def do_benchmark(runtime, operation, benchmark, field, count, *args):
     benchmark(runtime, operation, field, count).benchmark(*args)
 
_______________________________________________
viff-commits mailing list
[email protected]
http://lists.viff.dk/listinfo.cgi/viff-commits-viff.dk

Reply via email to