changeset 1283:9043758a351a

Moved creation of preruntime up before benchmark instantiation.
author Janus Dam Nielsen <janus.nielsen@alexandra.dk>
date Fri, 16 Oct 2009 15:58:49 +0200
parents 7265daadaa63
children eaf317ca1b80
files apps/benchmark.py
diffstat 1 files changed, 15 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- 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)