summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/InstrumentationI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/InstrumentationI.cpp')
-rw-r--r--cpp/src/Ice/InstrumentationI.cpp116
1 files changed, 58 insertions, 58 deletions
diff --git a/cpp/src/Ice/InstrumentationI.cpp b/cpp/src/Ice/InstrumentationI.cpp
index 60d17e89b21..f5ddd6e6fb4 100644
--- a/cpp/src/Ice/InstrumentationI.cpp
+++ b/cpp/src/Ice/InstrumentationI.cpp
@@ -22,7 +22,7 @@ using namespace IceInternal;
using namespace Ice::Instrumentation;
using namespace IceMX;
-namespace
+namespace
{
Context emptyCtx;
@@ -44,14 +44,14 @@ getThreadStateMetric(ThreadState s)
assert(false);
return 0;
}
-}
+}
-struct ThreadStateChanged
+struct ThreadStateChanged
{
ThreadStateChanged(ThreadState oldState, ThreadState newState) : oldState(oldState), newState(newState)
{
}
-
+
void operator()(const ThreadMetricsPtr& v)
{
if(oldState != ThreadStateIdle)
@@ -75,7 +75,7 @@ public:
class Attributes : public AttributeResolverT<ConnectionHelper>
{
public:
-
+
Attributes()
{
add("parent", &ConnectionHelper::getParent);
@@ -85,8 +85,8 @@ public:
}
};
static Attributes attributes;
-
- ConnectionHelper(const ConnectionInfoPtr& con, const EndpointPtr& endpt, ConnectionState state) :
+
+ ConnectionHelper(const ConnectionInfoPtr& con, const EndpointPtr& endpt, ConnectionState state) :
_connectionInfo(con), _endpoint(endpt), _state(state)
{
}
@@ -102,7 +102,7 @@ public:
if(_id.empty())
{
ostringstream os;
- IPConnectionInfoPtr info = IPConnectionInfoPtr::dynamicCast(_connectionInfo);
+ IPConnectionInfoPtr info = ICE_DYNAMIC_CAST(IPConnectionInfo, _connectionInfo);
if(info)
{
os << info->localAddress << ':' << info->localPort;
@@ -142,8 +142,8 @@ public:
return "";
}
}
-
- string
+
+ string
getParent() const
{
if(!_connectionInfo->adapterName.empty())
@@ -155,7 +155,7 @@ public:
return "Communicator";
}
}
-
+
const ConnectionInfoPtr&
getConnectionInfo() const
{
@@ -177,7 +177,7 @@ public:
}
return _endpointInfo;
}
-
+
private:
const ConnectionInfoPtr& _connectionInfo;
@@ -196,7 +196,7 @@ public:
class Attributes : public AttributeResolverT<DispatchHelper>
{
public:
-
+
Attributes()
{
add("parent", &DispatchHelper::getParent);
@@ -215,7 +215,7 @@ public:
}
};
static Attributes attributes;
-
+
DispatchHelper(const Current& current, int size) : _current(current), _size(size)
{
}
@@ -265,7 +265,7 @@ public:
return _id;
}
- string
+ string
getParent() const
{
return _current.adapter->getName();
@@ -336,7 +336,7 @@ public:
class Attributes : public AttributeResolverT<InvocationHelper>
{
public:
-
+
Attributes()
{
add("parent", &InvocationHelper::getParent);
@@ -353,8 +353,8 @@ public:
}
};
static Attributes attributes;
-
- InvocationHelper(const ObjectPrx& proxy, const string& op, const Context& ctx = emptyCtx) :
+
+ InvocationHelper(const ObjectPrxPtr& proxy, const string& op, const Context& ctx = emptyCtx) :
_proxy(proxy), _operation(op), _context(ctx)
{
}
@@ -388,23 +388,23 @@ public:
if(_proxy->ice_isTwoway())
{
return "twoway";
- }
+ }
else if(_proxy->ice_isOneway())
{
return "oneway";
- }
+ }
else if(_proxy->ice_isBatchOneway())
{
return "batch-oneway";
- }
+ }
else if(_proxy->ice_isDatagram())
{
return "datagram";
- }
+ }
else if(_proxy->ice_isBatchDatagram())
{
return "batch-datagram";
- }
+ }
else
{
throw invalid_argument("mode");
@@ -439,13 +439,13 @@ public:
return _id;
}
- string
+ string
getParent() const
{
return "Communicator";
}
- const ObjectPrx&
+ const ObjectPrxPtr&
getProxy() const
{
return _proxy;
@@ -473,7 +473,7 @@ public:
private:
- const ObjectPrx& _proxy;
+ const ObjectPrxPtr& _proxy;
const string& _operation;
const Context& _context;
mutable string _id;
@@ -488,7 +488,7 @@ public:
class Attributes : public AttributeResolverT<RemoteInvocationHelper>
{
public:
-
+
Attributes()
{
add("parent", &RemoteInvocationHelper::getParent);
@@ -498,8 +498,8 @@ public:
}
};
static Attributes attributes;
-
- RemoteInvocationHelper(const ConnectionInfoPtr& con, const EndpointPtr& endpt, int requestId, int size) :
+
+ RemoteInvocationHelper(const ConnectionInfoPtr& con, const EndpointPtr& endpt, int requestId, int size) :
_connectionInfo(con), _endpoint(endpt), _requestId(requestId), _size(size)
{
}
@@ -527,8 +527,8 @@ public:
}
return _id;
}
-
- string
+
+ string
getParent() const
{
if(!_connectionInfo->adapterName.empty())
@@ -540,7 +540,7 @@ public:
return "Communicator";
}
}
-
+
const ConnectionInfoPtr&
getConnectionInfo() const
{
@@ -590,7 +590,7 @@ public:
class Attributes : public AttributeResolverT<CollocatedInvocationHelper>
{
public:
-
+
Attributes()
{
add("parent", &CollocatedInvocationHelper::getParent);
@@ -599,8 +599,8 @@ public:
}
};
static Attributes attributes;
-
- CollocatedInvocationHelper(const Ice::ObjectAdapterPtr& adapter, int requestId, int size) :
+
+ CollocatedInvocationHelper(const Ice::ObjectAdapterPtr& adapter, int requestId, int size) :
_requestId(requestId), _size(size), _id(adapter->getName())
{
}
@@ -620,8 +620,8 @@ public:
{
return _id;
}
-
- string
+
+ string
getParent() const
{
return "Communicator";
@@ -649,7 +649,7 @@ public:
class Attributes : public AttributeResolverT<ThreadHelper>
{
public:
-
+
Attributes()
{
add("parent", &ThreadHelper::_parent);
@@ -657,7 +657,7 @@ public:
}
};
static Attributes attributes;
-
+
ThreadHelper(const string& parent, const string& id, ThreadState state) : _parent(parent), _id(id), _state(state)
{
}
@@ -676,7 +676,7 @@ public:
}
private:
-
+
const string _parent;
const string _id;
const ThreadState _state;
@@ -691,7 +691,7 @@ public:
class Attributes : public AttributeResolverT<EndpointHelper>
{
public:
-
+
Attributes()
{
add("parent", &EndpointHelper::getParent);
@@ -700,7 +700,7 @@ public:
}
};
static Attributes attributes;
-
+
EndpointHelper(const EndpointPtr& endpt, const string& id) : _endpoint(endpt), _id(id)
{
}
@@ -747,7 +747,7 @@ public:
}
private:
-
+
const EndpointPtr _endpoint;
mutable string _id;
mutable EndpointInfoPtr _endpointInfo;
@@ -757,7 +757,7 @@ EndpointHelper::Attributes EndpointHelper::attributes;
}
-void
+void
ConnectionObserverI::sentBytes(Int num)
{
forEach(add(&ConnectionMetrics::sentBytes, num));
@@ -767,7 +767,7 @@ ConnectionObserverI::sentBytes(Int num)
}
}
-void
+void
ConnectionObserverI::receivedBytes(Int num)
{
forEach(add(&ConnectionMetrics::receivedBytes, num));
@@ -849,8 +849,8 @@ InvocationObserverI::userException()
}
RemoteObserverPtr
-InvocationObserverI::getRemoteObserver(const ConnectionInfoPtr& connection,
- const EndpointPtr& endpoint,
+InvocationObserverI::getRemoteObserver(const ConnectionInfoPtr& connection,
+ const EndpointPtr& endpoint,
int requestId,
int size)
{
@@ -861,7 +861,7 @@ InvocationObserverI::getRemoteObserver(const ConnectionInfoPtr& connection,
{
delegate = _delegate->getRemoteObserver(connection, endpoint, requestId, size);
}
- return getObserverWithDelegate<RemoteObserverI>("Remote",
+ return getObserverWithDelegate<RemoteObserverI>("Remote",
RemoteInvocationHelper(connection, endpoint, requestId, size),
delegate);
}
@@ -891,7 +891,7 @@ InvocationObserverI::getCollocatedObserver(const Ice::ObjectAdapterPtr& adapter,
return 0;
}
-CommunicatorObserverI::CommunicatorObserverI(const InitializationData& initData) :
+CommunicatorObserverI::CommunicatorObserverI(const InitializationData& initData) :
_metrics(new MetricsAdminI(initData.properties, initData.logger)),
_delegate(initData.observer),
_connections(_metrics, "Connection"),
@@ -962,10 +962,10 @@ CommunicatorObserverI::getEndpointLookupObserver(const EndpointPtr& endpt)
return 0;
}
-ConnectionObserverPtr
-CommunicatorObserverI::getConnectionObserver(const ConnectionInfoPtr& con,
+ConnectionObserverPtr
+CommunicatorObserverI::getConnectionObserver(const ConnectionInfoPtr& con,
const EndpointPtr& endpt,
- ConnectionState state,
+ ConnectionState state,
const ConnectionObserverPtr& observer)
{
if(_connections.isEnabled())
@@ -989,8 +989,8 @@ CommunicatorObserverI::getConnectionObserver(const ConnectionInfoPtr& con,
return 0;
}
-ThreadObserverPtr
-CommunicatorObserverI::getThreadObserver(const string& parent,
+ThreadObserverPtr
+CommunicatorObserverI::getThreadObserver(const string& parent,
const string& id,
ThreadState state,
const ThreadObserverPtr& observer)
@@ -1016,8 +1016,8 @@ CommunicatorObserverI::getThreadObserver(const string& parent,
return 0;
}
-InvocationObserverPtr
-CommunicatorObserverI::getInvocationObserver(const ObjectPrx& proxy, const string& op, const Context& ctx)
+InvocationObserverPtr
+CommunicatorObserverI::getInvocationObserver(const ObjectPrxPtr& proxy, const string& op, const Context& ctx)
{
if(_invocations.isEnabled())
{
@@ -1039,7 +1039,7 @@ CommunicatorObserverI::getInvocationObserver(const ObjectPrx& proxy, const strin
return 0;
}
-DispatchObserverPtr
+DispatchObserverPtr
CommunicatorObserverI::getDispatchObserver(const Current& current, int size)
{
if(_dispatch.isEnabled())
@@ -1062,7 +1062,7 @@ CommunicatorObserverI::getDispatchObserver(const Current& current, int size)
return 0;
}
-const IceInternal::MetricsAdminIPtr&
+const IceInternal::MetricsAdminIPtr&
CommunicatorObserverI::getFacet() const
{
assert(_metrics);