]> AND Public Git Repository - simgrid.git/blobdiff - src/surf/plugins/host_energy.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove unneeded extern "C".
[simgrid.git] / src / surf / plugins / host_energy.cpp
index d7cbb73d77971a0174e6daaa1073f52489d7ade4..0b3ca1d3b563d8707c4217067e9d13dc8cbf90f8 100644 (file)
@@ -5,17 +5,12 @@
 
 #include "simgrid/plugins/energy.h"
 #include "simgrid/plugins/load.h"
-#include "simgrid/simix.hpp"
 #include "src/plugins/vm/VirtualMachineImpl.hpp"
 #include "src/surf/cpu_interface.hpp"
-
 #include "simgrid/s4u/Engine.hpp"
 
 #include <boost/algorithm/string/classification.hpp>
 #include <boost/algorithm/string/split.hpp>
-#include <string>
-#include <utility>
-#include <vector>
 
 /** @addtogroup plugin_energy
 
@@ -237,7 +232,7 @@ double HostEnergy::getCurrentWattsValue()
     // We consider that the machine is then fully loaded. That's arbitrary but it avoids a NaN
     cpu_load = 1;
   else
-    cpu_load = host->pimpl_cpu->constraint()->get_usage() / current_speed;
+    cpu_load = host->pimpl_cpu->get_constraint()->get_usage() / current_speed;
 
   /** Divide by the number of cores here **/
   cpu_load /= host->pimpl_cpu->coreCount();