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