clean up driver
This commit is contained in:
7
client/driver/fabfile.py
vendored
7
client/driver/fabfile.py
vendored
@@ -273,6 +273,7 @@ def load_oltpbench():
|
||||
msg = 'oltpbench config {} does not exist, '.format(dconf.OLTPBENCH_CONFIG)
|
||||
msg += 'please double check the option in driver_config.py'
|
||||
raise Exception(msg)
|
||||
set_oltpbench_config()
|
||||
cmd = "./oltpbenchmark -b {} -c {} --create=true --load=true".\
|
||||
format(dconf.OLTPBENCH_BENCH, dconf.OLTPBENCH_CONFIG)
|
||||
with lcd(dconf.OLTPBENCH_HOME): # pylint: disable=not-context-manager
|
||||
@@ -285,6 +286,7 @@ def run_oltpbench():
|
||||
msg = 'oltpbench config {} does not exist, '.format(dconf.OLTPBENCH_CONFIG)
|
||||
msg += 'please double check the option in driver_config.py'
|
||||
raise Exception(msg)
|
||||
set_oltpbench_config()
|
||||
cmd = "./oltpbenchmark -b {} -c {} --execute=true -s 5 -o outputfile".\
|
||||
format(dconf.OLTPBENCH_BENCH, dconf.OLTPBENCH_CONFIG)
|
||||
with lcd(dconf.OLTPBENCH_HOME): # pylint: disable=not-context-manager
|
||||
@@ -297,6 +299,8 @@ def run_oltpbench_bg():
|
||||
msg = 'oltpbench config {} does not exist, '.format(dconf.OLTPBENCH_CONFIG)
|
||||
msg += 'please double check the option in driver_config.py'
|
||||
raise Exception(msg)
|
||||
# set oltpbench config, including db username, password, url
|
||||
set_oltpbench_config()
|
||||
cmd = "./oltpbenchmark -b {} -c {} --execute=true -s 5 -o outputfile > {} 2>&1 &".\
|
||||
format(dconf.OLTPBENCH_BENCH, dconf.OLTPBENCH_CONFIG, dconf.OLTPBENCH_LOG)
|
||||
with lcd(dconf.OLTPBENCH_HOME): # pylint: disable=not-context-manager
|
||||
@@ -731,9 +735,6 @@ def loop(i):
|
||||
p.start()
|
||||
LOG.info('Run the controller')
|
||||
|
||||
# set oltpbench config, including db username, password, url
|
||||
set_oltpbench_config()
|
||||
|
||||
# run oltpbench as a background job
|
||||
while not _ready_to_start_oltpbench():
|
||||
time.sleep(1)
|
||||
|
||||
Reference in New Issue
Block a user