From 285ca60cf814ce4b96813e929ced910d53097aef Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Tue, 19 May 2009 21:18:52 +0000 Subject: Instrumentation for measuring latencies. Compiled out of normal builds, enable with -DQPID_LATENCY_TRACKER. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@776463 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/cluster/Multicaster.cpp | 4 ++++ 1 file changed, 4 insertions(+) (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 3b9d3ac990..f72867de4d 100644 --- a/cpp/src/qpid/cluster/Multicaster.cpp +++ b/cpp/src/qpid/cluster/Multicaster.cpp @@ -31,6 +31,9 @@ namespace cluster { Multicaster::Multicaster(Cpg& cpg_, const boost::shared_ptr& poller, boost::function onError_) : +#if defined (QPID_LATENCY_TRACKER) + cpgLatency("CPG"), +#endif onError(onError_), cpg(cpg_), queue(boost::bind(&Multicaster::sendMcast, this, _1), poller), holding(true) @@ -58,6 +61,7 @@ void Multicaster::mcastBuffer(const char* data, size_t size, const ConnectionId& void Multicaster::mcast(const Event& e) { { sys::Mutex::ScopedLock l(lock); + LATENCY_TRACK(cpgLatency.start()); if (e.getType() == DATA && e.isConnection() && holding) { holdingQueue.push_back(e); return; -- cgit v1.2.1