Skip to content
This repository was archived by the owner on Feb 28, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/funkload/BenchRunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def load_module(test_module):
module = __import__(test_module)
parts = test_module.split('.')[1:]
while parts:
part = parts.pop()
part = parts.pop(0)
module = getattr(module, part)
return module

Expand Down Expand Up @@ -879,15 +879,15 @@ def run_distributed(options, module_name, class_name, method_name, sys_args):
ret = None
from funkload.Distributed import DistributionMgr
global _manager

try:
distmgr = DistributionMgr(
module_name, class_name, method_name, options, sys_args)
_manager = distmgr
except UserWarning, error:
trace(red_str("Distribution failed with:%s \n" % (error)))
return 1

try:
try:
distmgr.prepare_workers(allow_errors=True)
Expand All @@ -898,20 +898,20 @@ def run_distributed(options, module_name, class_name, method_name, sys_args):
finally:
# in any case we want to stop the workers at the end
distmgr.abort()

_manager = None
return ret

def run_local(options, module_name, class_name, method_name):
ret = None
RunnerClass = get_runner_class(options.bench_runner_class)
bench = RunnerClass(module_name, class_name, method_name, options)

# Start a HTTP server optionally
if options.debugserver:
http_server_thread = FunkLoadHTTPServer(bench, options.debugport)
http_server_thread.start()

try:
ret = bench.run()
except KeyboardInterrupt:
Expand Down