summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2011-04-04 19:15:30 +0000
committerAlan Conway <aconway@apache.org>2011-04-04 19:15:30 +0000
commitd371c22e19ad8d2d1bdc54a71eae16a43c43a8bf (patch)
tree8eb6c53f91d7cdcfc0b75e02b76f14cb1d18b2d5
parent94f8a410fd84813258f3bb7db3868a6a47f8fc80 (diff)
downloadqpid-python-d371c22e19ad8d2d1bdc54a71eae16a43c43a8bf.tar.gz
NO-JIRA: minor improvements to qpid-cpp-benchmark, more flexible arguments.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1088738 13f79535-47bb-0310-9956-ffa450edef68
-rwxr-xr-xqpid/cpp/src/tests/qpid-cluster-benchmark15
1 files changed, 9 insertions, 6 deletions
diff --git a/qpid/cpp/src/tests/qpid-cluster-benchmark b/qpid/cpp/src/tests/qpid-cluster-benchmark
index 5f0e020475..ff787a46dd 100755
--- a/qpid/cpp/src/tests/qpid-cluster-benchmark
+++ b/qpid/cpp/src/tests/qpid-cluster-benchmark
@@ -22,13 +22,13 @@
# Default values
PORT="5672"
-BROKERS=`echo $HOSTS | sed "s/\>/:$PORT/g;s/ /,/g"` # Broker URL list
COUNT=10000
FLOW=100 # Flow control limit on queue depth for latency.
REPEAT=10
-SCALE=10
+QUEUES=4
+CLIENTS=3
-while getopts "p:c:f:r:t:b:" opt; do
+while getopts "p:c:f:r:t:b:q:c" opt; do
case $opt in
p) PORT=$OPTARG;;
c) COUNT=$OPTARG;;
@@ -36,19 +36,22 @@ while getopts "p:c:f:r:t:b:" opt; do
r) REPEAT=$OPTARG;;
s) SCALE=$OPTARG;;
b) BROKERS=$OPTARG;;
+ q) QUEUES=$OPTARG;;
+ c) CLIENTS=$OPTARG;;
*) echo "Unknown option"; exit 1;;
esac
done
-BROKER=`echo $HOSTS | sed 's/,.*//'` # First broker
+BROKERS=${BROKERS:-$(echo $HOSTS | sed "s/\>/:$PORT/g;s/ /,/g")} # Broker URL list
+BROKER=`echo $BROKERS | awk -F, '{print $1}'` # First broker
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 -s$SCALE -r$SCALE -m $COUNT
+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 -s$SCALE -r$SCALE -m $COUNT
+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