From dba9444db8ef7d6bcfb3a54f1ef64e966be1154e Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Mon, 13 Feb 2012 14:10:02 +0000 Subject: 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 --- qpid/cpp/src/tests/qpid-cpp-benchmark | 3 +++ qpid/cpp/src/tests/qpid-receive.cpp | 2 ++ 2 files changed, 5 insertions(+) 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); -- cgit v1.2.1