From 97f49bad071be7b6a811e0869b0414a629322951 Mon Sep 17 00:00:00 2001 From: bohanjason Date: Sat, 23 May 2020 19:24:14 -0400 Subject: [PATCH] clean up driver --- client/driver/fabfile.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/client/driver/fabfile.py b/client/driver/fabfile.py index 480a013..20c6a2e 100644 --- a/client/driver/fabfile.py +++ b/client/driver/fabfile.py @@ -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)