diff options
| author | Alan Conway <aconway@apache.org> | 2010-11-04 19:12:59 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2010-11-04 19:12:59 +0000 |
| commit | 53ba8a5c6c5422fc04f395f952cd8f5d3388b0b5 (patch) | |
| tree | 73b0805093d6505c8264470c38a17f3ed779d590 /cpp/src/tests | |
| parent | 1fb3f46a6212677889868ac68f058714e6b992ad (diff) | |
| download | qpid-python-53ba8a5c6c5422fc04f395f952cd8f5d3388b0b5.tar.gz | |
qpid-cpp-benchmark: allow extra arguments to qpid-send/receive, fix exception error.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1031162 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests')
| -rwxr-xr-x | cpp/src/tests/qpid-cpp-benchmark | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/cpp/src/tests/qpid-cpp-benchmark b/cpp/src/tests/qpid-cpp-benchmark index 1e0d75a49e..7d9d45435f 100755 --- a/cpp/src/tests/qpid-cpp-benchmark +++ b/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),[]) |
