Author: aconway
Date: Mon Feb 13 14:10:02 2012
New Revision: 1243526
URL: http://svn.apache.org/viewvc?rev=1243526&view=rev
Log:
QPID-3603: Restore default --sequence=no to qpid-cpp-benchmark.
Setting --sequence=yes to qpid-send has a significant impact on throughput,
restoring original default so results before/after the change are comparable.
Modified:
qpid/branches/qpid-3603-2/qpid/cpp/src/tests/qpid-cpp-benchmark
qpid/branches/qpid-3603-2/qpid/cpp/src/tests/qpid-receive.cpp
Modified: qpid/branches/qpid-3603-2/qpid/cpp/src/tests/qpid-cpp-benchmark
URL:
http://svn.apache.org/viewvc/qpid/branches/qpid-3603-2/qpid/cpp/src/tests/qpid-cpp-benchmark?rev=1243526&r1=1243525&r2=1243526&view=diff
==============================================================================
--- qpid/branches/qpid-3603-2/qpid/cpp/src/tests/qpid-cpp-benchmark (original)
+++ qpid/branches/qpid-3603-2/qpid/cpp/src/tests/qpid-cpp-benchmark Mon Feb 13
14:10:02 2012
@@ -63,6 +63,8 @@ op.add_option("--receive-arg", default=[
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("--sequence", dest="sequence", default=False,
+ action="store_true", help="add a sequence number to each
message")
op.add_option("--connection-options", type="str",
help="Connection options for senders & receivers")
op.add_option("--flow-control", default=0, type="int", metavar="N",
@@ -147,6 +149,7 @@ def start_send(queue, opts, broker, host
"--report-total",
"--report-header=no",
"--timestamp=%s"%(opts.timestamp and "yes" or "no"),
+ "--sequence=%s"%(opts.sequence and "yes" or "no"),
"--flow-control", str(opts.flow_control),
"--durable", str(opts.durable)
]
Modified: qpid/branches/qpid-3603-2/qpid/cpp/src/tests/qpid-receive.cpp
URL:
http://svn.apache.org/viewvc/qpid/branches/qpid-3603-2/qpid/cpp/src/tests/qpid-receive.cpp?rev=1243526&r1=1243525&r2=1243526&view=diff
==============================================================================
--- qpid/branches/qpid-3603-2/qpid/cpp/src/tests/qpid-receive.cpp (original)
+++ qpid/branches/qpid-3603-2/qpid/cpp/src/tests/qpid-receive.cpp Mon Feb 13
14:10:02 2012
@@ -156,6 +156,8 @@ class SequenceTracker
/** Return true if the message should be procesed, false if it should be
ignored. */
bool track(Message& message) {
+ if (!(opts.verifySequence || opts.ignoreDuplicates))
+ return true; // Not checking sequence numbers.
uint sn = message.getProperties()[SN];
bool duplicate = (sn <= lastSn);
bool dropped = (sn > lastSn+1);
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]