summaryrefslogtreecommitdiff
path: root/cpp/src/tests/perfdist
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-09-05 19:53:44 +0000
committerAlan Conway <aconway@apache.org>2008-09-05 19:53:44 +0000
commit98ec4b4e9226b7d9221dfd5a8eeddd408e3e1caf (patch)
tree9a89658107dd1ecc21ee9cd9a0e979d77d80e7bb /cpp/src/tests/perfdist
parent34048060a1c00291e0d7a56725001deb3100c6e2 (diff)
downloadqpid-python-98ec4b4e9226b7d9221dfd5a8eeddd408e3e1caf.tar.gz
Fixed cluster membership notification.
Cluster events with RefCountedBuffers for queueing. PollableQueue clears bacth immediately. Improved perfdist: clients hit multiple brokers in a cluster. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@692521 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/perfdist')
-rwxr-xr-xcpp/src/tests/perfdist38
1 files changed, 23 insertions, 15 deletions
diff --git a/cpp/src/tests/perfdist b/cpp/src/tests/perfdist
index 59b6396fe0..9ba92310a9 100755
--- a/cpp/src/tests/perfdist
+++ b/cpp/src/tests/perfdist
@@ -7,17 +7,16 @@
set -e
usage() {
cat <<EOF
-usage: $0 <perftest-args> -- <client-hosts ...>
+usage: $0 <perftest-args> -- <client-hosts ...> [ --- <broker hosts...> ]
+Client & broker hosts can also be set in env vars CLIENTS and BROKERS.
-Run perftest with clients running on the listed hosts. Clients are
-assigned to hosts publishers first, then subscribers the host list is
-used round-robin if there are more clients than hosts. perftest-args should
-include a --host <brokerhost> flag (and --port if necessary).
+Run perftest with clients running on the clients and brokers running
+on the specified hosts. Clients are assigned to client hosts round
+robin: publishers first, then subscribers. If there are multiple
+brokers (for cluster tests) clients connect to them round robin.
-Do not pass preftest action flags: --setup, --control, --publish, --subscribe.
-The script will pass them to the appropriate client processes.
-
-Note all perftest args must come before --.
+Broker hosts can be listed with -b in perftest-args or after ---
+at the end of the arguments.
Error: $*
EOF
@@ -36,19 +35,28 @@ while test $# -gt 0; do
--npubs) collect $1 $2; NPUBS=$2; shift 2 ;;
--nsubs) collect $1 $2; NSUBS=$2; shift 2 ;;
-s|--summary) collect $1; QUIET=yes; shift 1 ;;
- --) COLLECT=HOSTS; shift ;;
+ -b|--broker) BROKERS="$BROKERS $2"; shift 2;;
+ --) COLLECT=CLIENTARG; shift ;;
+ ---) COLLECT=BROKERARG; shift;;
*) collect $1; shift ;;
esac
done
-if [ -z "$HOSTS" ]; then usage "No hosts listed after --"; fi
+CLIENTS=${CLIENTARG:-$CLIENTS}
+if [ -z "$CLIENTS" ]; then usage "No client hosts listed after --"; fi
+BROKERS=${BROKERARG:-$BROKERS}
+if [ -z "$BROKERS" ]; then usage "No brokers specified"; fi
+
PERFTEST="$TESTDIR/perftest $ARGS"
-HOSTS=($HOSTS)
+CLIENTS=($CLIENTS)
+BROKERS=($BROKERS)
start() {
- HOST=${HOSTS[i % ${#HOSTS[*]}]}
- test -z "$QUIET" && echo "Client $i on $HOST $*"
- ssh -fT $HOST "PATH=$ADDPATH:\$PATH" $PERFTEST "$@"
+ CLIENT=${CLIENTS[i % ${#CLIENTS[*]}]}
+ BROKER=${BROKERS[i % ${#BROKERS[*]}]}
+ ARGS="$* --broker $BROKER"
+ test -z "$QUIET" && echo "Client $i on $CLIENT: $ARGS"
+ ssh -fT $CLIENT $PERFTEST "$@"
}
$PERFTEST --setup