diff options
| author | Alan Conway <aconway@apache.org> | 2011-11-08 14:41:43 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2011-11-08 14:41:43 +0000 |
| commit | 0b1f6cbb66c19a7bd620e24d1a7e5dff284518cf (patch) | |
| tree | 271c3802bf9422ea756bff96d236f6ce81656c64 /qpid/cpp/src/tests/qpid-cluster-benchmark | |
| parent | 1c90ca7456e04263635ef3d626808bf8a1118ad8 (diff) | |
| download | qpid-python-0b1f6cbb66c19a7bd620e24d1a7e5dff284518cf.tar.gz | |
NO-JIRA: Improvements to benchmark scripts.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1199265 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/qpid-cluster-benchmark')
| -rwxr-xr-x | qpid/cpp/src/tests/qpid-cluster-benchmark | 56 |
1 files changed, 26 insertions, 30 deletions
diff --git a/qpid/cpp/src/tests/qpid-cluster-benchmark b/qpid/cpp/src/tests/qpid-cluster-benchmark index 662f604919..4d6eaba223 100755 --- a/qpid/cpp/src/tests/qpid-cluster-benchmark +++ b/qpid/cpp/src/tests/qpid-cluster-benchmark @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file @@ -20,39 +20,35 @@ # Benchmark script for comparing cluster performance. -# Default values -PORT="5672" -COUNT=10000 -FLOW=100 # Flow control limit on queue depth for latency. -REPEAT=10 -QUEUES=4 -CLIENTS=3 - -while getopts "p:c:f:r:t:b:q:c" opt; do +# Default options +MESSAGES="-m 10000" +FLOW="--flow-control 100" # Flow control limit on queue depth for latency. +REPEAT="--repeat 10" +QUEUES="-q 6" +SENDERS="-s 3" +RECEIVERS="-r 3" +BROKERS= # Local broker +CLIENT_HOSTS= # No ssh, all clients are local + +while getopts "m:f:n:b:q:s:r:c:x:t" opt; do case $opt in - p) PORT=$OPTARG;; - c) COUNT=$OPTARG;; - f) FLOW=$OPTARG;; - r) REPEAT=$OPTARG;; - s) SCALE=$OPTARG;; - b) BROKERS=$OPTARG;; - q) QUEUES=$OPTARG;; - c) CLIENTS=$OPTARG;; + m) MESSAGES="-m $OPTARG";; + f) FLOW="--flow-control $OPTARG";; + n) REPEAT="--repeat $OPTARG";; + b) BROKERS="-b $OPTARG";; + q) QUEUES="-q $OPTARG";; + s) SENDERS="-s $OPTARG";; + r) RECEIVERS="-r $OPTARG";; + c) CLIENT_HOSTS="-c $OPTARG";; + x) SAVE_RECEIVED="--save-received";; + t) TCP_NODELAY="--connection-options {tcp-nodelay:true}";; *) echo "Unknown option"; exit 1;; esac done - -BROKERS=${BROKERS:-$(echo $HOSTS | sed "s/\>/:$PORT/g;s/ /,/g")} # Broker URL list -BROKER=`echo $BROKERS | awk -F, '{print $1}'` # First broker - +BROKER=$(echo $BROKERS | sed s/,.*//) run_test() { echo $*; shift; "$@"; echo; echo; echo; } -# Multiple pubs/subs connect via multiple brokers (active-active) -run_test "multi-host-thruput" qpid-cpp-benchmark --repeat $REPEAT -b $BROKERS --no-timestamp --summarize -q$QUEUES -s$CLIENTS -r$CLIENTS -m $COUNT - -# Multiple pubs/subs connect via single broker (active-passive) -run_test "single-host-thruput" qpid-cpp-benchmark --repeat $REPEAT -b $BROKER --no-timestamp --summarize -q$QUEUES -s$CLIENTS -r$CLIENTS -m $COUNT - -# Latency -run_test "latency" qpid-cpp-benchmark --repeat $REPEAT -b $BROKER --connection-options '{tcp-nodelay:true}' -m $COUNT --flow-control $FLOW +OPTS="$REPEAT $BROKERS --summarize $QUEUES $SENDERS $RECEIVERS $MESSAGES $CLIENT_HOSTS $SAVE_RECEIVED $TCP_NODELAY" +run_test "Queue contention:" qpid-cpp-benchmark $OPTS +run_test "No queue contention: :" qpid-cpp-benchmark $OPTS --group-receivers |
