blob: ba7f0a4f27dd427bf38a3d9fe9a022fdc550c20d [file] [log] [blame]
Craig Tiller2c2cf6d2015-04-09 09:40:20 -07001#!/bin/sh
2
3# performs a single qps run with one client and one server
4
5set -ex
6
7cd $(dirname $0)/../../..
8
9killall qps_worker || true
10
11config=opt
12
13NUMCPUS=`python2.7 -c 'import multiprocessing; print multiprocessing.cpu_count()'`
14
15make CONFIG=$config qps_worker qps_smoke_test -j$NUMCPUS
16
17bins/$config/qps_worker -driver_port 10000 -server_port 10001 &
18PID1=$!
19bins/$config/qps_worker -driver_port 10010 -server_port 10011 &
20PID2=$!
21
22export QPS_WORKERS="localhost:10000,localhost:10010"
23
24bins/$config/qps_smoke_test $*
25
26kill -2 $PID1 $PID2
27wait
28