blob: 2f60b4e49dec55a36bc11cd6c8aa5963e9a5c702 [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
Craig Tiller6af9ed02015-03-02 22:42:10 -08009killall qps_worker || true
Craig Tiller2d0f36c2015-02-23 23:16:17 -080010
11config=opt
12
Craig Tillere4860192015-02-23 17:10:41 -080013NUMCPUS=`python2.7 -c 'import multiprocessing; print multiprocessing.cpu_count()'`
14
Craig Tiller6af9ed02015-03-02 22:42:10 -080015make CONFIG=$config qps_worker qps_driver -j$NUMCPUS
Craig Tillere4860192015-02-23 17:10:41 -080016
Craig Tiller6af9ed02015-03-02 22:42:10 -080017bins/$config/qps_worker -driver_port 10000 -server_port 10001 &
18PID1=$!
19bins/$config/qps_worker -driver_port 10010 -server_port 10011 &
20PID2=$!
Craig Tillere4860192015-02-23 17:10:41 -080021
Craig Tiller6af9ed02015-03-02 22:42:10 -080022export QPS_WORKERS="localhost:10000,localhost:10010"
Craig Tillere4860192015-02-23 17:10:41 -080023
Craig Tiller2d0f36c2015-02-23 23:16:17 -080024bins/$config/qps_driver $*
Craig Tillere4860192015-02-23 17:10:41 -080025
Craig Tiller6af9ed02015-03-02 22:42:10 -080026kill -2 $PID1 $PID2
Craig Tillere4860192015-02-23 17:10:41 -080027wait
28