summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2012-02-13 14:10:02 +0000
committerAlan Conway <aconway@apache.org>2012-02-13 14:10:02 +0000
commitdba9444db8ef7d6bcfb3a54f1ef64e966be1154e (patch)
tree6d751096c1642b4835c5d4c7aaa4735f2c87de87
parent4689bcbf5ba9023a85393547304516b006b28c6e (diff)
downloadqpid-python-dba9444db8ef7d6bcfb3a54f1ef64e966be1154e.tar.gz
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. git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/qpid-3603-2@1243526 13f79535-47bb-0310-9956-ffa450edef68
-rwxr-xr-xqpid/cpp/src/tests/qpid-cpp-benchmark3
-rw-r--r--qpid/cpp/src/tests/qpid-receive.cpp2
2 files changed, 5 insertions, 0 deletions
diff --git a/qpid/cpp/src/tests/qpid-cpp-benchmark b/qpid/cpp/src/tests/qpid-cpp-benchmark
index b59cb1739d..19c01dd08a 100755
--- a/qpid/cpp/src/tests/qpid-cpp-benchmark
+++ b/qpid/cpp/src/tests/qpid-cpp-benchmark
@@ -63,6 +63,8 @@ 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("--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)
]
diff --git a/qpid/cpp/src/tests/qpid-receive.cpp b/qpid/cpp/src/tests/qpid-receive.cpp
index 7e94e8cf39..6deeb566dc 100644
--- a/qpid/cpp/src/tests/qpid-receive.cpp
+++ b/qpid/cpp/src/tests/qpid-receive.cpp
@@ -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);