diff options
author | Alan Conway <aconway@apache.org> | 2009-01-20 22:11:37 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2009-01-20 22:11:37 +0000 |
commit | 066fd1ab9f1840cfe09204bc5f3d550f1e12d49b (patch) | |
tree | 51c9961e79c811c3240710bd7b7435a73e11c2b7 /cpp/src/qpid/cluster/Multicaster.cpp | |
parent | 861692abf515cf136e86e70446d005e7849a0f87 (diff) | |
download | qpid-python-066fd1ab9f1840cfe09204bc5f3d550f1e12d49b.tar.gz |
Latency measurements, compiled out of production code.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@736135 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/Multicaster.cpp')
-rw-r--r-- | cpp/src/qpid/cluster/Multicaster.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cpp/src/qpid/cluster/Multicaster.cpp b/cpp/src/qpid/cluster/Multicaster.cpp index 34614dc1ef..4fa12651eb 100644 --- a/cpp/src/qpid/cluster/Multicaster.cpp +++ b/cpp/src/qpid/cluster/Multicaster.cpp @@ -23,7 +23,7 @@ #include "Cpg.h" #include "ClusterLeaveException.h" #include "qpid/log/Statement.h" - +#include "qpid/sys/LatencyMetric.h" namespace qpid { namespace cluster { @@ -59,8 +59,8 @@ void Multicaster::mcast(const Event& e) { return; } } + QPID_LATENCY_INIT(e); queue.push(e); - } @@ -76,7 +76,8 @@ void Multicaster::sendMcast(PollableEventQueue::Queue& values) { } ++pending; } - iovec iov = { const_cast<char*>(i->getStore()), i->getStoreSize() }; + QPID_LATENCY_RECORD("mcast send queue", *i); + iovec iov = i->toIovec(); if (!cpg.mcast(&iov, 1)) { // cpg didn't send because of CPG flow control. if (mcastMax) { @@ -104,8 +105,9 @@ void Multicaster::release() { holdingQueue.clear(); } -void Multicaster::selfDeliver(const Event&) { +void Multicaster::selfDeliver(const Event& e) { sys::Mutex::ScopedLock l(lock); + QPID_LATENCY_RECORD("cpg self deliver", e); if (mcastMax) { assert(pending > 0); assert(pending <= mcastMax); |