X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=source%2Fdiameter.comm%2FServerSession.cpp;h=4a146b8e0dda6402efd4e336373c9ac37a278f4d;hb=26c27c2b83f99e6df420addc90010eb0d4a7724e;hp=ad0b15a26e776caa186756eaf94f45b909e50c52;hpb=2921c651c9945cefec0715167201596aaa079e8d;p=anna.git diff --git a/source/diameter.comm/ServerSession.cpp b/source/diameter.comm/ServerSession.cpp index ad0b15a..4a146b8 100644 --- a/source/diameter.comm/ServerSession.cpp +++ b/source/diameter.comm/ServerSession.cpp @@ -378,7 +378,7 @@ throw(anna::RuntimeException) { oamModule.count(isRequest ? OamModule::Counter::RequestReceived : OamModule::Counter::AnswerReceived); oamModule.count(isRequest ? OamModule::Counter::RequestReceivedOnServerSession : OamModule::Counter::AnswerReceivedOnServerSession); // 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) { // Si recibo un request, el message solo tiene fiable el DataBlock. Como por defecto se construye como ApplicationMessage, @@ -428,7 +428,7 @@ throw(anna::RuntimeException) { try { // application message counters - ApplicationMessageOamModule::instantiate().count(cid.first, anna::diameter::codec::functions::getApplicationId(db), ApplicationMessageOamModule::Counter::Request_Received_AsServer); + ApplicationMessageOamModule::instantiate().count(cid.first, -1 /* no result code */, anna::diameter::codec::functions::getApplicationId(db), ApplicationMessageOamModule::Counter::Request_Received_AsServer); eventRequest(db); } catch(anna::RuntimeException& ex) { @@ -481,7 +481,7 @@ throw(anna::RuntimeException) { oamModule.activateAlarm(OamModule::Alarm::AnswerReceivedOnServerSessionUnknown); // application message counters - ApplicationMessageOamModule::instantiate().count(cid.first, anna::diameter::codec::functions::getApplicationId(db), ApplicationMessageOamModule::Counter::Answer_UnknownReceived_AsServer); + ApplicationMessageOamModule::instantiate().count(cid.first, resultCode, anna::diameter::codec::functions::getApplicationId(db), ApplicationMessageOamModule::Counter::Answer_UnknownReceived_AsServer); eventUnknownResponse(db); @@ -503,14 +503,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 client (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 client (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->setRequestClientSessionKey(response->getRequest()->getRequestClientSessionKey()); // "" means unkown/unset @@ -532,7 +532,7 @@ throw(anna::RuntimeException) { diameter::codec::functions::setEndToEnd((anna::DataBlock&)db, response->getRequest()->getRequestEndToEnd()); // application message counters - ApplicationMessageOamModule::instantiate().count(cid.first, anna::diameter::codec::functions::getApplicationId(db), ApplicationMessageOamModule::Counter::Answer_Received_AsServer); + ApplicationMessageOamModule::instantiate().count(cid.first, resultCode, anna::diameter::codec::functions::getApplicationId(db), ApplicationMessageOamModule::Counter::Answer_Received_AsServer); eventResponse(*response); @@ -567,7 +567,7 @@ void ServerSession::finalize() throw() { } // Inform father local server (availability changes): - bool changes = getParent()->refreshAvailability(); + getParent()->refreshAvailability(); // OAM bool multipleConnections = (getParent()->getMaxConnections() > 1); std::string socket = anna::functions::socketLiteralAsString(getAddress(), getPort()); @@ -759,7 +759,7 @@ void ServerSession::countSendings(const diameter::CommandId & cid, unsigned int else if(cid == helpers::base::COMMANDID__Disconnect_Peer_Request) oamModule.count(OamModule::Counter::DPRSentOK); // Application messages: else { - appMsgOamModule.count(cid.first, aid, isRequest ? ApplicationMessageOamModule::Counter::Request_SentOK_AsServer : ApplicationMessageOamModule::Counter::Answer_SentOK_AsServer); + appMsgOamModule.count(cid.first, -1 /* no result code */, aid, isRequest ? ApplicationMessageOamModule::Counter::Request_SentOK_AsServer : ApplicationMessageOamModule::Counter::Answer_SentOK_AsServer); } } else { // Main counters: @@ -773,7 +773,7 @@ void ServerSession::countSendings(const diameter::CommandId & cid, unsigned int else if(cid == helpers::base::COMMANDID__Disconnect_Peer_Request) oamModule.count(OamModule::Counter::DPRSentNOK); // Application messages: else { - appMsgOamModule.count(cid.first, aid, isRequest ? ApplicationMessageOamModule::Counter::Request_SentNOK_AsServer : ApplicationMessageOamModule::Counter::Answer_SentNOK_AsServer); + appMsgOamModule.count(cid.first, -1 /* no result code */, aid, isRequest ? ApplicationMessageOamModule::Counter::Request_SentNOK_AsServer : ApplicationMessageOamModule::Counter::Answer_SentNOK_AsServer); } } }