From 6d93918e12caf0fdc736219598076a80c91ae5fd Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Wed, 21 Jan 2009 15:44:42 +0000 Subject: Additional latency measurement points. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@736326 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/cluster/Connection.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cpp/src/qpid/cluster/Connection.cpp') diff --git a/cpp/src/qpid/cluster/Connection.cpp b/cpp/src/qpid/cluster/Connection.cpp index f0d38bf299..cdee87dfcd 100644 --- a/cpp/src/qpid/cluster/Connection.cpp +++ b/cpp/src/qpid/cluster/Connection.cpp @@ -39,6 +39,7 @@ #include "qpid/framing/ConnectionCloseBody.h" #include "qpid/framing/ConnectionCloseOkBody.h" #include "qpid/log/Statement.h" +#include "qpid/sys/LatencyMetric.h" #include @@ -73,7 +74,7 @@ Connection::Connection(Cluster& c, sys::ConnectionOutputHandler& out, void Connection::init() { QPID_LOG(debug, cluster << " new connection: " << *this); - if (isLocal() && !isCatchUp()) { + if (isLocal() && !isCatchUp() && cluster.getReadMax()) { output.giveReadCredit(cluster.getReadMax()); } } @@ -137,6 +138,7 @@ bool Connection::checkUnsupported(const AMQBody& body) { // Delivered from cluster. void Connection::delivered(framing::AMQFrame& f) { QPID_LOG(trace, cluster << " RECV: " << *this << ": " << f); + QPID_LATENCY_INIT(f); assert(!catchUp); currentChannel = f.getChannel(); if (!framing::invoke(*this, *f.getBody()).wasHandled() // Connection contol. -- cgit v1.2.1