Improve data analysis

This commit is contained in:
Loic Guegan 2021-05-10 16:03:46 +02:00
parent 44147f8896
commit 9c9be6752d
10 changed files with 19315 additions and 19212 deletions

View file

@ -93,6 +93,7 @@ static void obs_node(std::vector<std::string> args) {
u32 nSendFail=0;
u32 nRcvFail=0;
u32 nSend=0;
double totalUptime=0;
while(i.ShouldContinue()){
XBT_INFO("%s is spleeping",selfName.c_str());
MODE_OFF();
@ -102,6 +103,7 @@ static void obs_node(std::vector<std::string> args) {
// Doing wake up stuff
double uptime=i.GetDuration();
double startUptime=simgrid::s4u::Engine::get_clock();
while(uptime>0.00001){ // Ensure not infinite loop even if it should not happend (we loose accuracy here but just in case)
try {
if(isSender){ // If I am a sender
@ -180,8 +182,9 @@ static void obs_node(std::vector<std::string> args) {
// Load next event
i.GotoNextEvent();
nWakeUp++; // Increase the number of wake up
totalUptime+=simgrid::s4u::Engine::get_clock()-startUptime;
}
// Done
MODE_OFF()
XBT_INFO("Observation node %s finished [LOG2PARSE](node:%s|nSend:%d|nWakeUp:%d|nDataRcv:%d|nSendFail:%d|nRcvFail:%d|seed:%d)",selfName.c_str(),selfName.c_str(),nSend,nWakeUp,nDataRcv,nSendFail,nRcvFail,i.seed);
XBT_INFO("Observation node %s finished [LOG2PARSE](node:%s|nSend:%d|nWakeUp:%d|nDataRcv:%d|nSendFail:%d|nRcvFail:%d|totalUptime:%f|seed:%d)",selfName.c_str(),selfName.c_str(),nSend,nWakeUp,nDataRcv,nSendFail,nRcvFail,totalUptime,i.seed);
}