X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=example%2Fdiameter%2Flauncher%2FLauncher.cpp;h=fbced4afca6316a892de2ff6ed17eb4ba5fa54ba;hb=d87ad4d7b6950eb6d7dc912df3a370c85d3c5a1e;hp=e8ac212fbde8eedc554edafd0f1e608c8d64eb6c;hpb=13b6f0196c2091f9e88a0778155cdcb733cfdafd;p=anna.git diff --git a/example/diameter/launcher/Launcher.cpp b/example/diameter/launcher/Launcher.cpp index e8ac212..fbced4a 100644 --- a/example/diameter/launcher/Launcher.cpp +++ b/example/diameter/launcher/Launcher.cpp @@ -988,6 +988,8 @@ std::string Launcher::help() const throw() { result += "\n This operation applies over all the registered realm nodes"; result += "\n except if one specific working node has been set."; result += "\nforceCountersRecord Forces dump to file the current counters of the process."; + result += "\noam-and-stats Dumps current counters and statistics of the process. This is"; + result += "\n also done at process context dump."; result += "\n"; result += "\n[|
:][|socket id]"; result += "\n"; @@ -1438,6 +1440,13 @@ void Launcher::eventOperation(const std::string &operation, std::string &respons return; } + // OAM & statistics: + if(operation == "oam-and-stats") { + anna::xml::Node root("root"); + response_content = anna::xml::Compiler().apply(oamAndStatsAsXML(&root)); + return; + } + /////////////////////////////////////////////////////////////////// // Tokenize operation Tokenizer params; @@ -2119,6 +2128,19 @@ throw() { it->second->asXML(result); } + // OAM & statistics: + oamAndStatsAsXML(result); + + // Testing: could be heavy if test case reports are enabled + TestManager::instantiate().asXML(result); + + return result; +} + +anna::xml::Node* Launcher::oamAndStatsAsXML(anna::xml::Node* parent) const +throw() { + anna::xml::Node* result = parent->createChild("OamAndStatistics"); + // OAM: anna::diameter::comm::OamModule::instantiate().asXML(result); anna::diameter::comm::ApplicationMessageOamModule::instantiate().asXML(result); @@ -2126,8 +2148,6 @@ throw() { // Statistics: anna::statistics::Engine::instantiate().asXML(result); - // Testing: could be heavy if test case reports are enabled - TestManager::instantiate().asXML(result); - return result; } +