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(); }
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.<pid>' by mean 'kill -10 <pid>'.";
+ result += "\nforceCountersRecord Forces dump to file the current counters of the process.";
result += "\n";
result += "\n<visibility action>|[<address>:<port>]|[socket id]";
result += "\n";
return;
}
+ // Counters dump on demand:
+ if(operation == "forceCountersRecord") {
+ forceCountersRecord();
+ response_content = "Current counters have been dump to disk\n";
+ return;
+ }
+
///////////////////////////////////////////////////////////////////
// Tokenize operation
Tokenizer params;
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 '";
* and stack-specific commands in other set of xml files. Application only would have to load common part for all
* the created dictionaries with this method and specific one for each final dictionary:
*
- * @param xmlPathFile Path file to the xml document which represents the diameter dictionary.
+ * @param pathFile Path file to the xml document which represents the diameter dictionary.
*
* <pre>
* Dictionary *nokiaStack = stackEngine.createDictionary("/var/tmp/vendors_and_avps.xml", NOKIA_STACK_ID);
* huaweiStack->load("/var/tmp/huawei_commands.xml");
* </pre>
*/
- void load(const std::string & xmlPathFile) throw(anna::RuntimeException);
+ virtual void load(const std::string & pathFile) throw(anna::RuntimeException);
/**
* Clears dictionary content
//------------------------------------------------------------------------------
//----------------------------------------------------------- Dictionary::load()
//------------------------------------------------------------------------------
-void Dictionary::load(const std::string & xmlPathFile) throw(anna::RuntimeException) {
- if(xmlPathFile == "")
+void Dictionary::load(const std::string & pathFile) throw(anna::RuntimeException) {
+ if(pathFile == "")
throw anna::RuntimeException("Empty xml path file provided", ANNA_FILE_LOCATION);
LOGDEBUG(
std::string trace = "Loading diameter dictionary from '";
- trace += xmlPathFile;
+ trace += pathFile;
trace += "' ...";
anna::Logger::debug(trace, ANNA_FILE_LOCATION);
);
try {
anna::xml::DocumentFile xmlDocument; // has private copy constructor defined but not implemented to avoid inhenrit/copy (is very heavy)
const anna::xml::Node *rootNode;
- xmlDocument.initialize(xmlPathFile.c_str()); // fail here is i/o error
+ xmlDocument.initialize(pathFile.c_str()); // fail here is i/o error
rootNode = xmlDocument.parse(*a_dtd); // Parsing: fail here if xml violates dtd
a_name = rootNode->getAttribute("name")->getValue();
//checkUniqueIdentifiers(rootNode); // Check unique id within xml, for vendor, avp and command nodes: