diff options
| author | Alan Conway <aconway@apache.org> | 2009-05-19 21:18:52 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2009-05-19 21:18:52 +0000 |
| commit | 285ca60cf814ce4b96813e929ced910d53097aef (patch) | |
| tree | 347254ab8c4b2c27d6a095ccdac7ed444ed993b0 /cpp/src/qpid/cluster/Multicaster.cpp | |
| parent | fe0a36ba0edb47757a7bc7331764631ebd20205e (diff) | |
| download | qpid-python-285ca60cf814ce4b96813e929ced910d53097aef.tar.gz | |
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
Diffstat (limited to 'cpp/src/qpid/cluster/Multicaster.cpp')
| -rw-r--r-- | cpp/src/qpid/cluster/Multicaster.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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<sys::Poller>& poller, boost::function<void()> 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; |
