unsigned int received_pieces = 0;
unsigned int total_pieces = 0;
- Peer() { me = simgrid::s4u::Mailbox::byName(simgrid::s4u::Host::current()->get_cname()); }
+ Peer() { me = simgrid::s4u::Mailbox::by_name(simgrid::s4u::Host::current()->get_cname()); }
~Peer() = default;
void joinChain()
for (int i = 1; i <= hostcount; i++) {
std::string name = std::string("node-") + std::to_string(i) + ".acme.org";
XBT_DEBUG("%s", name.c_str());
- mailboxes.push_back(simgrid::s4u::Mailbox::byName(name));
+ mailboxes.push_back(simgrid::s4u::Mailbox::by_name(name));
}
}
Peer* p = new Peer();
- double start_time = simgrid::s4u::Engine::getClock();
+ double start_time = simgrid::s4u::Engine::get_clock();
p->joinChain();
p->forwardFile();
simgrid::s4u::Comm::wait_all(&p->pending_sends);
- double end_time = simgrid::s4u::Engine::getClock();
+ double end_time = simgrid::s4u::Engine::get_clock();
XBT_INFO("### %f %llu bytes (Avg %f MB/s); copy finished (simulated).", end_time - start_time, p->received_bytes,
p->received_bytes / 1024.0 / 1024.0 / (end_time - start_time));
simgrid::s4u::Actor::create("peer", simgrid::s4u::Host::by_name("node-8.acme.org"), peer);
e.run();
- XBT_INFO("Total simulation time: %e", simgrid::s4u::Engine::getClock());
+ XBT_INFO("Total simulation time: %e", simgrid::s4u::Engine::get_clock());
return 0;
}