X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=example%2Fdiameter%2Flauncher%2FLauncher.cpp;h=8804736819f5d91bc29781095cfd1729416f6326;hb=a211583cf603238caf00f0aa6b59ece84fb12864;hp=239095f79af5577f4fc8d9cad4655010d71baaf1;hpb=129500a50678c43ff28fb0054d6197899b8c0b2c;p=anna.git diff --git a/example/diameter/launcher/Launcher.cpp b/example/diameter/launcher/Launcher.cpp index 239095f..8804736 100644 --- a/example/diameter/launcher/Launcher.cpp +++ b/example/diameter/launcher/Launcher.cpp @@ -282,7 +282,7 @@ void Launcher::checkTimeMeasure(const char * commandLineParameter, bool optional if(anna::functions::isLike("^[0-9]+$", parameter)) { // para incluir numeros decimales: ^[0-9]+(.[0-9]+)?$ int msecs = cl.getIntegerValue(commandLineParameter); - if(msecs > a_timeEngine->getMaxTimeout()) { + if(msecs > a_timeEngine->getMaxTimeout()) { // 600000 ms std::string msg = "Commandline parameter '"; msg += commandLineParameter; msg += "' is greater than allowed max timeout for timming engine: "; @@ -290,6 +290,13 @@ void Launcher::checkTimeMeasure(const char * commandLineParameter, bool optional throw RuntimeException(msg, ANNA_FILE_LOCATION); } + if(msecs > 300000) { + std::string msg = "Commandline parameter '"; + msg += commandLineParameter; + msg += "' is perhaps very big (over 5 minutes). Take into account memory consumption issues."; + LOGWARNING(anna::Logger::warning(msg, ANNA_FILE_LOCATION)); + } + if(msecs <= a_timeEngine->getResolution()) { std::string msg = "Commandline parameter '"; msg += commandLineParameter; @@ -336,7 +343,7 @@ throw(anna::RuntimeException) { // if (cl.exists ("clone")) // workMode = anna::comm::Communicator::WorkMode::Clone; a_communicator = new MyCommunicator(workMode); - a_timeEngine = new anna::timex::Engine((anna::Millisecond)300000, (anna::Millisecond)150); + a_timeEngine = new anna::timex::Engine((anna::Millisecond)600000, (anna::Millisecond)150); // Counters record procedure: anna::Millisecond cntRecordPeriod = (anna::Millisecond)300000; // ms