X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=source%2Fdiameter.comm%2FClientSession.cpp;h=87c9cc12f1e49165c586094ef9deef2e3b48f000;hb=7a95a46884196bba99dec374276f229d84832a32;hp=5a7ca94f775acfe4bdfeb4967f31c27a476e6248;hpb=129af2a9a7c287843be5bd443c5b1ad9b08438a8;p=anna.git diff --git a/source/diameter.comm/ClientSession.cpp b/source/diameter.comm/ClientSession.cpp index 5a7ca94..87c9cc1 100644 --- a/source/diameter.comm/ClientSession.cpp +++ b/source/diameter.comm/ClientSession.cpp @@ -41,11 +41,6 @@ #include // rand() #include -// XXXXXXXXXX -#include - - - using namespace std; using namespace anna::diameter; @@ -453,6 +448,12 @@ void ClientSession::eventPeerShutdown() throw() { } void ClientSession::eventRequestRetransmission(Message *request) throw() { + + // OAM + OamModule &oamModule = OamModule::instantiate(); + oamModule.count(OamModule::Counter::RequestRetransmitted); + oamModule.count(OamModule::Counter::RequestRetransmittedOnClientSession); + // Inform father server: a_parent->eventRequestRetransmission(this, request); } @@ -509,12 +510,13 @@ throw(anna::RuntimeException) { } } ); + // Main counters: OamModule &oamModule = OamModule::instantiate(); oamModule.count(isRequest ? OamModule::Counter::RequestReceived : OamModule::Counter::AnswerReceived); oamModule.count(isRequest ? OamModule::Counter::RequestReceivedOnClientSession : OamModule::Counter::AnswerReceivedOnClientSession); // Statistic (size) - a_parent->updateReceivedMessageSizeStatisticConcept(message.getSize()); // only on reception (application could manage sent sizes) + a_parent->updateReceivedMessageSizeStatisticConcept(message.getSize(), cid); // only on reception (application could manage sent sizes) if(isRequest) { ///////////////////////////// @@ -677,14 +679,14 @@ throw(anna::RuntimeException) { anna::Millisecond current = (anna::Millisecond)anna::functions::millisecond(); anna::Millisecond request = response->getRequest()->getRequestTimestampMs(); anna::Millisecond timeToAnswerMs = current - request; - a_parent->updateProcessingTimeStatisticConcept(timeToAnswerMs); - LOGDEBUG - ( - std::string msg = "This diameter request context lasted "; - msg += anna::functions::asString(timeToAnswerMs); - msg += " milliseconds at diameter server (included network time)"; - anna::Logger::debug(msg, ANNA_FILE_LOCATION); - ); + a_parent->updateProcessingTimeStatisticConcept(timeToAnswerMs, cid); + //LOGDEBUG + //( + // std::string msg = "This diameter request context lasted "; + // msg += anna::functions::asString(timeToAnswerMs); + // msg += " milliseconds at diameter server (included network time)"; + // anna::Logger::debug(msg, ANNA_FILE_LOCATION); + //); // Progress origin for tracking purposes on asyncronous boxes with both diameter interfaces (entities and clients) Message * requestMessage = const_cast(response->getRequest()); requestMessage->setRequestServerSessionKey(response->getRequest()->getRequestServerSessionKey()); // -1 means unkown/unset