29#include <Ice/Connection.h>
30#include <Ice/Endpoint.h>
31#include <IceSSL/EndpointInfo.h>
72 report(ProfilerListenerPrx& profiler,
const std::string& applicationName)
74 profiler->reportNetworkTraffic(
79 std::atomic<Ice::Int>
sent{0};
99 reportNetworkTrafficTask =
102 observerTCP->report(profiler, applicationName);
103 observerUDP->report(profiler, applicationName);
104 observerSSL->report(profiler, applicationName);
105 observerUnknown->report(profiler, applicationName);
108 reportNetworkTrafficTask->
start();
114 reportNetworkTrafficTask->stop();
122 Ice::Instrumentation::ConnectionObserverPtr
124 const Ice::ConnectionInfoPtr& ,
125 const Ice::EndpointPtr& e,
126 Ice::Instrumentation::ConnectionState ,
127 const Ice::Instrumentation::ConnectionObserverPtr& )
129 const auto protocol = e->getInfo()->type();
132 case Ice::TCPEndpointType:
134 case Ice::UDPEndpointType:
136 case Ice::SSLEndpointType:
141 <<
"Unknown protocol with type " << protocol;
142 return observerUnknown;
146 Ice::Instrumentation::ObserverPtr
153 Ice::Instrumentation::ObserverPtr
159 Ice::Instrumentation::ThreadObserverPtr
162 Ice::Instrumentation::ThreadState,
163 const Ice::Instrumentation::ThreadObserverPtr&)
168 Ice::Instrumentation::InvocationObserverPtr
176 Ice::Instrumentation::DispatchObserverPtr
SpamFilterDataPtr deactivateSpam(SpamFilterDataPtr const &spamFilter, float deactivationDurationSec, const std::string &identifier, bool deactivate)
void start(ProfilerListenerPrx profiler, const std::string &applicationName)
Ice::Instrumentation::DispatchObserverPtr getDispatchObserver(const Ice::Current &, Ice::Int) override
Ice::Instrumentation::ThreadObserverPtr getThreadObserver(const std::string &, const std::string &, Ice::Instrumentation::ThreadState, const Ice::Instrumentation::ThreadObserverPtr &) override
Ice::Instrumentation::InvocationObserverPtr getInvocationObserver(const Ice::ObjectPrx &, const std::string &, const Ice::Context &) override
Ice::Instrumentation::ObserverPtr getConnectionEstablishmentObserver(const Ice::EndpointPtr &, const std::string &) override
ApplicationNetworkStats()
Ice::Instrumentation::ConnectionObserverPtr getConnectionObserver(const Ice::ConnectionInfoPtr &c, const Ice::EndpointPtr &e, Ice::Instrumentation::ConnectionState s, const Ice::Instrumentation::ConnectionObserverPtr &previous) override
~ApplicationNetworkStats() override
Ice::Instrumentation::ObserverPtr getEndpointLookupObserver(const Ice::EndpointPtr &) override
void setObserverUpdater(const Ice::Instrumentation::ObserverUpdaterPtr &upd) override
void start()
Starts the thread.
#define ARMARX_CHECK_EXPRESSION(expression)
This macro evaluates the expression and if it turns out to be false it will throw an ExpressionExcept...
#define ARMARX_WARNING
The logging level for unexpected behaviour, but not a serious problem.
This file offers overloads of toIce() and fromIce() functions for STL container types.
const std::string & to_string(const std::string &s)
void sentBytes(int num) override
void receivedBytes(int num) override
void failed(const std::string &) override
const std::string protocol
std::atomic< Ice::Int > received
std::atomic< Ice::Int > sent
void report(ProfilerListenerPrx &profiler, const std::string &applicationName)
ArmarXConnectionObserver(std::string protocol)