qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r1003231 - in /qpid/trunk/qpid/cpp/src/tests: Statistics.cpp allhosts qpid-cpp-benchmark qpid-test-cluster
Date Thu, 30 Sep 2010 20:06:36 GMT
Author: aconway
Date: Thu Sep 30 20:06:36 2010
New Revision: 1003231

URL: http://svn.apache.org/viewvc?rev=1003231&view=rev
Log:
Improvements to output & message distribution for qpid-cpp-benchmark.

Modified:
    qpid/trunk/qpid/cpp/src/tests/Statistics.cpp
    qpid/trunk/qpid/cpp/src/tests/allhosts
    qpid/trunk/qpid/cpp/src/tests/qpid-cpp-benchmark
    qpid/trunk/qpid/cpp/src/tests/qpid-test-cluster

Modified: qpid/trunk/qpid/cpp/src/tests/Statistics.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/Statistics.cpp?rev=1003231&r1=1003230&r2=1003231&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/Statistics.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/Statistics.cpp Thu Sep 30 20:06:36 2010
@@ -85,8 +85,6 @@ void ThroughputAndLatency::report(ostrea
         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)

Modified: qpid/trunk/qpid/cpp/src/tests/allhosts
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/allhosts?rev=1003231&r1=1003230&r2=1003231&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/allhosts (original)
+++ qpid/trunk/qpid/cpp/src/tests/allhosts Thu Sep 30 20:06:36 2010
@@ -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" ;;

Modified: qpid/trunk/qpid/cpp/src/tests/qpid-cpp-benchmark
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/qpid-cpp-benchmark?rev=1003231&r1=1003230&r2=1003231&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/qpid-cpp-benchmark (original)
+++ qpid/trunk/qpid/cpp/src/tests/qpid-cpp-benchmark Thu Sep 30 20:06:36 2010
@@ -53,7 +53,8 @@ op.add_option("--receive-option", defaul
               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_que
     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)
 

Modified: qpid/trunk/qpid/cpp/src/tests/qpid-test-cluster
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/qpid-test-cluster?rev=1003231&r1=1003230&r2=1003231&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/qpid-test-cluster (original)
+++ qpid/trunk/qpid/cpp/src/tests/qpid-test-cluster Thu Sep 30 20:06:36 2010
@@ -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



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message