From e4a72b66fdf2da41d2a2c484ae41773cbc75c2e6 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Thu, 4 Nov 2010 19:12:59 +0000 Subject: qpid-cpp-benchmark: allow extra arguments to qpid-send/receive, fix exception error. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1031162 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/tests/qpid-cpp-benchmark | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/qpid/cpp/src/tests/qpid-cpp-benchmark b/qpid/cpp/src/tests/qpid-cpp-benchmark index 1e0d75a49e..7d9d45435f 100755 --- a/qpid/cpp/src/tests/qpid-cpp-benchmark +++ b/qpid/cpp/src/tests/qpid-cpp-benchmark @@ -53,6 +53,10 @@ op.add_option("--send-option", default=[], action="append", type="str", 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_queue, broker, host): "--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),[]) -- cgit v1.2.1