You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2010/11/04 20:13:00 UTC
svn commit: r1031162 - /qpid/trunk/qpid/cpp/src/tests/qpid-cpp-benchmark
Author: aconway
Date: Thu Nov 4 19:12:59 2010
New Revision: 1031162
URL: http://svn.apache.org/viewvc?rev=1031162&view=rev
Log:
qpid-cpp-benchmark: allow extra arguments to qpid-send/receive, fix exception error.
Modified:
qpid/trunk/qpid/cpp/src/tests/qpid-cpp-benchmark
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=1031162&r1=1031161&r2=1031162&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/qpid-cpp-benchmark (original)
+++ qpid/trunk/qpid/cpp/src/tests/qpid-cpp-benchmark Thu Nov 4 19:12:59 2010
@@ -53,6 +53,10 @@ op.add_option("--send-option", default=[
help="Additional option for sending addresses")
op.add_option("--receive-option", default=[], action="append", type="str",
help="Additional option for receiving addresses")
+op.add_option("--send-arg", default=[], action="append", type="str",
+ help="Additional argument for qpid-send")
+op.add_option("--receive-arg", default=[], action="append", type="str",
+ help="Additional argument for qpid-receive")
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",
@@ -79,6 +83,7 @@ def start_receive(queue, opts, ready_que
"--ack-frequency", str(opts.ack_frequency),
"--ready-address", ready_queue,
"--report-header=no"]
+ command += opts.receive_arg
if opts.connection_options:
command += ["--connection-options",opts.connection_options]
if host: command = ssh_command(host, command)
@@ -97,6 +102,7 @@ def start_send(queue, opts, broker, host
"--report-header=no",
"--timestamp=%s"%(opts.timestamp and "yes" or "no"),
"--sequence=no"]
+ command += opts.send_arg
if opts.connection_options:
command += ["--connection-options",opts.connection_options]
if host: command = ssh_command(host, command)
@@ -172,8 +178,8 @@ class ReadyReceiver:
for r in receivers:
if (r.poll() is not None):
out,err=r.communicate()
- raise "Receiver error: %s"%(out)
- raise "Timed out waiting for receivers to be ready"
+ raise Exception("Receiver error: %s"%(out))
+ raise Exception("Timed out waiting for receivers to be ready")
def flatten(l): return sum(map(lambda s: s.split(","), l),[])
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org