1 #include "Receiver.hpp"
2 #include "PingPongTask.hpp"
4 #include <HostNotFoundException.hpp>
9 MSG_IMPLEMENT_DYNAMIC(Receiver, Process)
11 const double commSizeLat = 1;
12 const double commSizeBw = 100000000;
14 int Receiver::main(int argc, char** argv)
17 double communicationTime=0;
18 double time = getClock();
21 info("Try to get a task");
23 PingPongTask* task = reinterpret_cast<PingPongTask*>(Task::get(0));
25 double timeGot = getClock();
26 double timeSent = task->getTime();
30 info(TEXT_("Got at time ") + TEXT_(timeGot));
31 info(TEXT_("Was sent at time ") + TEXT_(timeSent));
35 communicationTime = timeGot - time;
37 info(TEXT_( "Communication time : ") + TEXT_(communicationTime));
39 info(TEXT_(" --- BW ") + bw.append(commSizeBw/communicationTime,"%07lf") + TEXT_(" ----"));