X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0f20fc561a88d0ef2218df796be8cc22f57feced..02ea6400fac5265cad1af98d468964d444fc82cb:/src/surf/plugins/energy.hpp diff --git a/src/surf/plugins/energy.hpp b/src/surf/plugins/energy.hpp index b854921247..26fa2999a3 100644 --- a/src/surf/plugins/energy.hpp +++ b/src/surf/plugins/energy.hpp @@ -8,7 +8,7 @@ #include -#include +#include #include "src/surf/HostImpl.hpp" @@ -20,12 +20,21 @@ namespace energy { class XBT_PRIVATE HostEnergy; +class PowerRange { + public: + double idle; + double min; + double max; + + PowerRange(double idle, double min, double max) : idle(idle), min(min), max(max) { + } +}; + class HostEnergy { public: static simgrid::xbt::Extension EXTENSION_ID; - typedef std::pair power_range; - HostEnergy(simgrid::s4u::Host *ptr); + explicit HostEnergy(simgrid::s4u::Host *ptr); ~HostEnergy(); double getCurrentWattsValue(double cpu_load); @@ -37,7 +46,7 @@ public: private: void initWattsRangeList(); simgrid::s4u::Host *host = nullptr; - std::vector power_range_watts_list; /*< List of (min_power,max_power) pairs corresponding to each cpu pstate */ + std::vector power_range_watts_list; /*< List of (min_power,max_power) pairs corresponding to each cpu pstate */ public: double watts_off = 0.0; /*< Consumption when the machine is turned off (shutdown) */ double total_energy = 0.0; /*< Total energy consumed by the host */