summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2010-09-30 20:06:36 +0000
committerAlan Conway <aconway@apache.org>2010-09-30 20:06:36 +0000
commit90d1a072de027f7c67d47a875047027e3ef0c0a0 (patch)
treea8f4bfee21779f550d3c670196d00b56c3dac27c
parent877ddb37e8874084771aaa814589b3ae4c9e020c (diff)
downloadqpid-python-90d1a072de027f7c67d47a875047027e3ef0c0a0.tar.gz
Improvements to output & message distribution for qpid-cpp-benchmark.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1003231 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/cpp/src/tests/Statistics.cpp2
-rwxr-xr-xqpid/cpp/src/tests/allhosts2
-rwxr-xr-xqpid/cpp/src/tests/qpid-cpp-benchmark8
-rwxr-xr-xqpid/cpp/src/tests/qpid-test-cluster5
4 files changed, 11 insertions, 6 deletions
diff --git a/qpid/cpp/src/tests/Statistics.cpp b/qpid/cpp/src/tests/Statistics.cpp
index 2452dc8be9..19531762b1 100644
--- a/qpid/cpp/src/tests/Statistics.cpp
+++ b/qpid/cpp/src/tests/Statistics.cpp
@@ -85,8 +85,6 @@ void ThroughputAndLatency::report(ostream& o) const {
o << fixed << setprecision(2)
<< '\t' << min << '\t' << max << '\t' << total/samples;
}
- else
- o << "\t[No latency samples]";
}
ReporterBase::ReporterBase(ostream& o, int batch, bool wantHeader)
diff --git a/qpid/cpp/src/tests/allhosts b/qpid/cpp/src/tests/allhosts
index 4a4a4c6e54..e43571aed4 100755
--- a/qpid/cpp/src/tests/allhosts
+++ b/qpid/cpp/src/tests/allhosts
@@ -36,7 +36,7 @@ Options:
while getopts "tl:bs:dqo:" opt; do
case $opt in
l) SSHOPTS="-l$OPTARG $SSHOPTS" ;;
- t) TERMOPT="-t" ;;
+ t) SSHOPTS="-t $SSHOPTS" ;;
b) BACKGROUND=1 ;;
d) BACKGROUND=1; DISOWN=1 ;;
s) SLEEP="sleep $OPTARG" ;;
diff --git a/qpid/cpp/src/tests/qpid-cpp-benchmark b/qpid/cpp/src/tests/qpid-cpp-benchmark
index 85efff9a36..9512aa7893 100755
--- a/qpid/cpp/src/tests/qpid-cpp-benchmark
+++ b/qpid/cpp/src/tests/qpid-cpp-benchmark
@@ -53,7 +53,8 @@ op.add_option("--receive-option", default=[], action="append", type="str",
help="Additional option for receiving addresses")
op.add_option("--no-timestamp", dest="timestamp", default=True,
action="store_false", help="don't add a timestamp, no latency results")
-
+op.add_option("--connection-options", type="str",
+ help="Connection options for senders & receivers")
single_quote_re = re.compile("'")
def posix_quote(string):
@@ -69,12 +70,15 @@ def start_receive(queue, opts, ready_queue, broker, host):
command = ["qpid-receive",
"-b", broker,
"-a", address,
+ "-m", str((opts.senders*opts.messages)/opts.receivers),
"--forever",
"--print-content=no",
"--report-total",
"--ack-frequency", str(opts.ack_frequency),
"--ready-address", ready_queue,
"--report-header=no"]
+ if opts.connection_options:
+ command += ["--connection-options",opts.connection_options]
if host: command = ssh_command(host, command)
return Popen(command, stdout=PIPE, stderr=STDOUT)
@@ -91,6 +95,8 @@ def start_send(queue, opts, broker, host):
"--report-header=no",
"--timestamp=%s"%(opts.timestamp and "yes" or "no"),
"--sequence=no"]
+ if opts.connection_options:
+ command += ["--connection-options",opts.connection_options]
if host: command = ssh_command(host, command)
return Popen(command, stdout=PIPE, stderr=STDOUT)
diff --git a/qpid/cpp/src/tests/qpid-test-cluster b/qpid/cpp/src/tests/qpid-test-cluster
index d604b5ba17..53d2bf436d 100755
--- a/qpid/cpp/src/tests/qpid-test-cluster
+++ b/qpid/cpp/src/tests/qpid-test-cluster
@@ -56,6 +56,7 @@ QPIDD_ARGS="$QPIDD_ARGS $*"
if test -n "$CONF_FILE"; then
copyall $CONF_FILE
QPIDD_ARGS="$QPIDD_ARGS --config $CONF_FILE"
+ QPID_PORT=${QPID_PORT:-`awk -F= '/^ *port=/ {print $2}' $CONF_FILE`}
fi
if test -n "$ENV_FILE"; then
copyall $ENV_FILE
@@ -76,9 +77,9 @@ do_stop() {
}
do_check() {
-# FIXME aconway 2010-09-29: add check - get port from config.
for h in $HOSTS; do
- if qpid-ping -b $h -q $OPTS &> /dev/null; then
+ test -n "$QPID_PORT" && PORTOPT="-p $QPID_PORT"
+ if qpid-ping -b $h $PORTOPT -q $* &> /dev/null; then
echo $h ok
else
echo $h failed