diff options
author | Alan Conway <aconway@apache.org> | 2012-04-16 19:20:03 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2012-04-16 19:20:03 +0000 |
commit | 6cf716b52c086e19a7439468b9de4e314625c55d (patch) | |
tree | d576adfcd72bebacacc985f5a1491d04f8d8ecf8 | |
parent | 67502dd834b2f4b4cd9666ccd09075f1132da602 (diff) | |
download | qpid-python-6cf716b52c086e19a7439468b9de4e314625c55d.tar.gz |
QPID-3603: Add heartbeat and reconnect options to qpid-cluster-benchmark
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1326754 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | qpid/cpp/src/tests/Makefile.am | 2 | ||||
-rwxr-xr-x | qpid/cpp/src/tests/qpid-cluster-benchmark | 24 |
2 files changed, 17 insertions, 9 deletions
diff --git a/qpid/cpp/src/tests/Makefile.am b/qpid/cpp/src/tests/Makefile.am index 7c0afc4a63..7a08a6d10b 100644 --- a/qpid/cpp/src/tests/Makefile.am +++ b/qpid/cpp/src/tests/Makefile.am @@ -149,7 +149,7 @@ endif # Test programs that are installed and therefore built as part of make, not make check -qpidexectest_SCRIPTS += qpid-cpp-benchmark install_env.sh +qpidexectest_SCRIPTS += qpid-cpp-benchmark qpid-cluster-benchmark install_env.sh EXTRA_DIST += qpid-cpp-benchmark install_env.sh qpidexectest_PROGRAMS += receiver diff --git a/qpid/cpp/src/tests/qpid-cluster-benchmark b/qpid/cpp/src/tests/qpid-cluster-benchmark index d836ed709c..10b751c46d 100755 --- a/qpid/cpp/src/tests/qpid-cluster-benchmark +++ b/qpid/cpp/src/tests/qpid-cluster-benchmark @@ -29,31 +29,39 @@ SENDERS="-s 3" RECEIVERS="-r 3" BROKERS= # Local broker CLIENT_HOSTS= # No ssh, all clients are local +# Connection options +TCP_NODELAY=false +RECONNECT=true +HEARTBEAT=1 -while getopts "m:f:n:b:q:s:r:c:txyv-" opt; do +while getopts "m:f:n:b:q:s:r:c:h:i:txyv-" opt; do case $opt in - m) MESSAGES="-m $OPTARG";; + b) BROKERS="-b $OPTARG";; + c) CLIENT_HOSTS="-c $OPTARG";; f) FLOW="--flow-control $OPTARG";; + h) HEARTBEAT=$OPTARG;; + i) RECONNECT=$OPTARG;; + m) MESSAGES="-m $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";; - t) TCP_NODELAY="--connection-options {tcp-nodelay:true}";; + s) SENDERS="-s $OPTARG";; + t) TCP_NODELAY=true;; + v) OPTS="--verbose";; x) SAVE_RECEIVED="--save-received";; y) NO_DELETE="--no-delete";; - v) OPTS="--verbose";; -) break ;; *) echo "Unknown option"; exit 1;; esac done shift $(($OPTIND-1)) +CONNECTION_OPTIONS="--connection-options {tcp-nodelay:$TCP_NODELAY,reconnect:$RECONNECT,heartbeat:$HEARTBEAT}" + REPLICATE="node:{x-declare:{arguments:{'qpid.replicate':all}}}" BROKER=$(echo $BROKERS | sed s/,.*//) run_test() { echo $*; shift; "$@"; echo; echo; echo; } -OPTS="$OPTS $REPEAT $BROKERS --summarize $QUEUES $SENDERS $RECEIVERS $MESSAGES $CLIENT_HOSTS $SAVE_RECEIVED $TCP_NODELAY $NO_DELETE" +OPTS="$OPTS $REPEAT $BROKERS --summarize $QUEUES $SENDERS $RECEIVERS $MESSAGES $CLIENT_HOSTS $SAVE_RECEIVED $CONNECTION_OPTIONS $NO_DELETE" OPTS="$OPTS --create-option $REPLICATE" run_test "Benchmark:" qpid-cpp-benchmark $OPTS "$@" |