blob: 1c2f1c85ebfae10c976239cb41fd587947ce4f5f [file] [log] [blame]
Craig Tillere4860192015-02-23 17:10:41 -08001#!/bin/sh
2
3# performs a single qps run with one client and one server
4
5set -ex
6
7cd $(dirname $0)/../../..
8
9NUMCPUS=`python2.7 -c 'import multiprocessing; print multiprocessing.cpu_count()'`
10
11make CONFIG=opt qps_client qps_server qps_driver -j$NUMCPUS
12
13bins/opt/qps_server -driver_port 10000 -port 10002 &
14SERVER_PID=$!
15bins/opt/qps_client -driver_port 10001 &
16CLIENT_PID=$!
17
18QPS_SERVERS=localhost:10000
19QPS_CLIENTS=localhost:10001
20
21bins/opt/qps_driver $*
22
23kill -2 $CLIENT_PID
24kill -2 $SERVER_PID
25wait
26