From 066fd1ab9f1840cfe09204bc5f3d550f1e12d49b Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Tue, 20 Jan 2009 22:11:37 +0000 Subject: 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 --- cpp/src/qpid/cluster/Multicaster.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'cpp/src/qpid/cluster/Multicaster.cpp') 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(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); -- cgit v1.2.1