diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2021-05-10 16:03:46 +0200 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2021-05-10 16:03:46 +0200 |
| commit | 9c9be6752d32106d18226e4eed7b7d68da79d178 (patch) | |
| tree | a52707c7837015bbcb6790bd5024276c27cdea0a /src | |
| parent | 44147f88960352f609491dfb473555d8d2494981 (diff) | |
Improve data analysis
Diffstat (limited to 'src')
| -rw-r--r-- | src/simulator.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/simulator.cc b/src/simulator.cc index 911f860..c3d961d 100644 --- a/src/simulator.cc +++ b/src/simulator.cc @@ -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); }
\ No newline at end of file |
