summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2012-02-14 16:10:13 +0000
committerAlan Conway <aconway@apache.org>2012-02-14 16:10:13 +0000
commitaff670213fb89cbc00672f57728f936772f54301 (patch)
tree11ab28001f19ae0dcba5c7516cf8c5b33d742723
parentdc5bbb40a7b661bd50cf230a976336074e15e15d (diff)
downloadqpid-python-aff670213fb89cbc00672f57728f936772f54301.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-6@1244091 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);