From 062e28bf5d289aee09d4010d3b306da6c822f74c Mon Sep 17 00:00:00 2001 From: Pedro Pinto Date: Tue, 8 Oct 2019 09:05:29 -0400 Subject: [PATCH] Removed logging in hot path. --- src/lib/mercury/broker/BrokerProxy.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/lib/mercury/broker/BrokerProxy.h b/src/lib/mercury/broker/BrokerProxy.h index 34abb5d05..3d1a2aaa8 100644 --- a/src/lib/mercury/broker/BrokerProxy.h +++ b/src/lib/mercury/broker/BrokerProxy.h @@ -82,7 +82,7 @@ class BrokerProxy : public ILocalBroker { void do_work(trace::PerfLog& log) { _cycles++; - _outgoing.consume_all([this,&log](BrokerMsg *m) { + _outgoing.consume_all([this,&](BrokerMsg *m) { switch (m->msg_type) { case BrokerMsgType::ADD_NEIGHBOUR: _real_broker.add_neighbour(*m->neighbour); @@ -102,13 +102,9 @@ class BrokerProxy : public ILocalBroker { case BrokerMsgType::UNSUBSCRIBE: _real_broker.unsubscribe(m->broker_id, m->sub_id, m->stream_id); break; - case BrokerMsgType::NOTIFY: { - LOG(Latency, Diag, "Notify broker {}. Cycles: {}", _id.value(), - _cycles); - auto scoped_do_work = trace::log_scope(log, {}, "BrokerProxy::notify"); + case BrokerMsgType::NOTIFY: _real_broker.notify(m->broker_id, m->stream_id, m->sub_id, m->notification); - } break; case BrokerMsgType::LOCAL_SUBSCRIBE: _real_broker.local_subscribe(m->local_sub_id, m->filter,