lib/benchmark/driver.rb in benchmark_driver-0.6.2 vs lib/benchmark/driver.rb in benchmark_driver-0.7.0
- old
+ new
@@ -55,14 +55,22 @@
script_class = config.jobs.first.script.class
unless config.jobs.all? { |j| j.script.is_a?(script_class) }
raise InvalidConfig.new('Benchmark scripts include both String and Proc. Only either of them should be specified.')
end
+
+ # TODO: invalidate prelude for call runner
end
def runner_type_for(config)
script_class = config.jobs.first.script.class
- script_class == Proc ? :call : :exec
+ if script_class == Proc
+ :call
+ elsif config.runner_options.executables_specified?
+ :exec
+ else
+ :eval
+ end
end
# benchmark_driver ouputs logs ASAP. This enables sync flag for it.
#
# Currently benchmark_driver supports only output to stdout.