Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
snake_case Engine signals
[simgrid.git] / src / surf / plugins / host_energy.cpp
index 7bf554e..e8f4fa4 100644 (file)
@@ -45,7 +45,7 @@ AllCores is 200 Watts.
 This is enough to compute the consumption as a function of the amount of loaded cores:
 
 <table>
-<tr><th>#Cores loaded</th><th>Consumption</th><th>Explanation</th></tr>
+<tr><th>\#Cores loaded</th><th>Consumption</th><th>Explanation</th></tr>
 <tr><td>0</td><td> 100 Watts</td><td>Idle value</td></tr>
 <tr><td>1</td><td> 120 Watts</td><td>OneCore value</td></tr>
 <tr><td>2</td><td> 147 Watts</td><td>linear extrapolation between OneCore and AllCores</td></tr>
@@ -424,7 +424,7 @@ static void onHostDestruction(simgrid::s4u::Host& host)
 
 static void onSimulationEnd()
 {
-  std::vector<simgrid::s4u::Host*> hosts = simgrid::s4u::Engine::getInstance()->get_all_hosts();
+  std::vector<simgrid::s4u::Host*> hosts = simgrid::s4u::Engine::get_instance()->get_all_hosts();
 
   double total_energy      = 0.0; // Total energy consumption (whole platform)
   double used_hosts_energy = 0.0; // Energy consumed by hosts that computed something
@@ -461,7 +461,7 @@ void sg_host_energy_plugin_init()
   simgrid::s4u::Host::onStateChange.connect(&onHostChange);
   simgrid::s4u::Host::onSpeedChange.connect(&onHostChange);
   simgrid::s4u::Host::onDestruction.connect(&onHostDestruction);
-  simgrid::s4u::onSimulationEnd.connect(&onSimulationEnd);
+  simgrid::s4u::on_simulation_end.connect(&onSimulationEnd);
   simgrid::surf::CpuAction::onStateChange.connect(&onActionStateChange);
 }
 
@@ -474,7 +474,7 @@ void sg_host_energy_plugin_init()
 void sg_host_energy_update_all()
 {
   simgrid::simix::kernelImmediate([]() {
-    std::vector<simgrid::s4u::Host*> list = simgrid::s4u::Engine::getInstance()->get_all_hosts();
+    std::vector<simgrid::s4u::Host*> list = simgrid::s4u::Engine::get_instance()->get_all_hosts();
     for (auto const& host : list)
       if (dynamic_cast<simgrid::s4u::VirtualMachine*>(host) == nullptr) // Ignore virtual machines
         host->extension<HostEnergy>()->update();