aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/qps/single_run_localhost.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/cpp/qps/single_run_localhost.sh')
-rwxr-xr-xtest/cpp/qps/single_run_localhost.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/cpp/qps/single_run_localhost.sh b/test/cpp/qps/single_run_localhost.sh
index ef3e343ebd..317202a6ab 100755
--- a/test/cpp/qps/single_run_localhost.sh
+++ b/test/cpp/qps/single_run_localhost.sh
@@ -6,13 +6,17 @@ set -ex
cd $(dirname $0)/../../..
+killall qps_server qps_client || true
+
+config=opt
+
NUMCPUS=`python2.7 -c 'import multiprocessing; print multiprocessing.cpu_count()'`
-make CONFIG=opt qps_client qps_server qps_driver -j$NUMCPUS
+make CONFIG=$config qps_client qps_server qps_driver -j$NUMCPUS
-bins/opt/qps_server -driver_port 10000 -port 10002 &
+bins/$config/qps_server -driver_port 10000 -port 10002 &
SERVER_PID=$!
-bins/opt/qps_client -driver_port 10001 &
+bins/$config/qps_client -driver_port 10001 &
CLIENT_PID=$!
# wait for startup
@@ -21,7 +25,7 @@ sleep 2
export QPS_SERVERS=localhost:10000
export QPS_CLIENTS=localhost:10001
-bins/opt/qps_driver $*
+bins/$config/qps_driver $*
kill -2 $CLIENT_PID
kill -2 $SERVER_PID