Craig Tiller | e486019 | 2015-02-23 17:10:41 -0800 | [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 | NUMCPUS=`python2.7 -c 'import multiprocessing; print multiprocessing.cpu_count()'` |
| 10 | |
| 11 | make CONFIG=opt qps_client qps_server qps_driver -j$NUMCPUS |
| 12 | |
| 13 | bins/opt/qps_server -driver_port 10000 -port 10002 & |
| 14 | SERVER_PID=$! |
| 15 | bins/opt/qps_client -driver_port 10001 & |
| 16 | CLIENT_PID=$! |
| 17 | |
| 18 | QPS_SERVERS=localhost:10000 |
| 19 | QPS_CLIENTS=localhost:10001 |
| 20 | |
| 21 | bins/opt/qps_driver $* |
| 22 | |
| 23 | kill -2 $CLIENT_PID |
| 24 | kill -2 $SERVER_PID |
| 25 | wait |
| 26 | |