summaryrefslogtreecommitdiff
path: root/cpp/src/tests/qpid-cpp-benchmark
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
commit98a1ec7556b70d57a7ec1312cbb47d0f4f9763be (patch)
tree287af90e8c61583ce42b7fa094d281c8be4b96b6 /cpp/src/tests/qpid-cpp-benchmark
parent2d6b93f90a82155fcae42c8bb941591764a79090 (diff)
downloadqpid-python-98a1ec7556b70d57a7ec1312cbb47d0f4f9763be.tar.gz
Improvements to output & message distribution for qpid-cpp-benchmark.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1003231 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/qpid-cpp-benchmark')
-rwxr-xr-xcpp/src/tests/qpid-cpp-benchmark8
1 files changed, 7 insertions, 1 deletions
diff --git a/cpp/src/tests/qpid-cpp-benchmark b/cpp/src/tests/qpid-cpp-benchmark
index 85efff9a36..9512aa7893 100755
--- a/cpp/src/tests/qpid-cpp-benchmark
+++ b/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)