X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=example%2Fdiameter%2Flauncher%2Fmain.cpp;h=44d2c069f9dea4dcf110130b3db26bb336c6b578;hb=7ac94d8f360628b59b7fed8bfbc4509ad055712e;hp=92dd89bf5d0478ca10b5aa0c01a7c35df75ce170;hpb=c6c1c4d0ae132261d93b933e97d5234d49040128;p=anna.git diff --git a/example/diameter/launcher/main.cpp b/example/diameter/launcher/main.cpp index 92dd89b..44d2c06 100644 --- a/example/diameter/launcher/main.cpp +++ b/example/diameter/launcher/main.cpp @@ -436,6 +436,7 @@ public: void writeBurstLogFile(const std::string &buffer) throw(); bool burstLogEnabled() const throw() { return (((a_burstLogFile == "") || (a_burstLogFile == "null")) ? false : true); } void startDiameterServer(int) throw(anna::RuntimeException); + void forceCountersRecord() throw(anna::RuntimeException) { if (a_counterRecorderClock) a_counterRecorderClock->tick(); } anna::xml::Node* asXML(anna::xml::Node* parent) const throw(); void resetStatistics() throw() { a_myDiameterEngine->resetStatistics(); } @@ -846,6 +847,7 @@ std::string Launcher::help() const throw() { result += "\ncollect Reset statistics and counters to start a new test stage of"; result += "\n performance measurement. Context data is written at"; result += "\n '/var/tmp/anna.context.' by mean 'kill -10 '."; + result += "\nforceCountersRecord Forces dump to file the current counters of the process."; result += "\n"; result += "\n|[
:]|[socket id]"; result += "\n"; @@ -1835,6 +1837,13 @@ void Launcher::eventOperation(const std::string &operation, std::string &respons return; } + // Counters dump on demand: + if(operation == "forceCountersRecord") { + forceCountersRecord(); + response_content = "Current counters have been dump to disk\n"; + return; + } + /////////////////////////////////////////////////////////////////// // Tokenize operation Tokenizer params; @@ -2228,14 +2237,14 @@ void Launcher::eventOperation(const std::string &operation, std::string &respons response_content += "' loaded."; response_content += "\n"; } else if((opType == "answerxml") || (opType == "answerxml2c")) { - response_content += "Answer to client '"; + response_content += "'"; response_content += param1; - response_content += "' programmed."; + response_content += "' applied on server FIFO queue"; response_content += "\n"; } else if(opType == "answerxml2e") { - response_content += "Answer to entity '"; + response_content += "'"; response_content += param1; - response_content += "' programmed."; + response_content += "' applied on client FIFO queue"; response_content += "\n"; } else if(opType == "diameterServerSessions") { response_content += "Maximum server socket connections updated to '";