SimGrid  3.14.159
Versatile Simulation of Distributed Systems
simgrid::energy::HostEnergy Class Reference

#include <energy.hpp>

Public Member Functions

 HostEnergy (simgrid::s4u::Host *ptr)
 
 ~HostEnergy ()
 
double getCurrentWattsValue (double cpu_load)
 Computes the power consumed by the host according to the current pstate and processor load. More...
 
double getConsumedEnergy ()
 
double getWattMinAt (int pstate)
 
double getWattMaxAt (int pstate)
 
void update ()
 

Public Attributes

double watts_off = 0.0
 
double total_energy = 0.0
 
double last_updated
 

Static Public Attributes

static simgrid::xbt::Extension< simgrid::s4u::Host, HostEnergyEXTENSION_ID
 

Constructor & Destructor Documentation

§ HostEnergy()

simgrid::energy::HostEnergy::HostEnergy ( simgrid::s4u::Host ptr)
explicit

§ ~HostEnergy()

simgrid::energy::HostEnergy::~HostEnergy ( )
default

Member Function Documentation

§ getCurrentWattsValue()

double simgrid::energy::HostEnergy::getCurrentWattsValue ( double  cpu_load)

Computes the power consumed by the host according to the current pstate and processor load.

The min_power states how much we consume when only one single core is working. This means that when cpu_load == 1/coreCount, then current_power == min_power.

The maximum must be reached when all cores are working (but 1 core was already accounted for by min_power) i.e., we need min_power + (maxCpuLoad-1/coreCount)*power_slope == max_power (maxCpuLoad is by definition 1)

§ getConsumedEnergy()

double simgrid::energy::HostEnergy::getConsumedEnergy ( )

§ getWattMinAt()

double simgrid::energy::HostEnergy::getWattMinAt ( int  pstate)

§ getWattMaxAt()

double simgrid::energy::HostEnergy::getWattMaxAt ( int  pstate)

§ update()

void simgrid::energy::HostEnergy::update ( )

Divide by the number of cores here

Member Data Documentation

§ EXTENSION_ID

simgrid::xbt::Extension< simgrid::s4u::Host, HostEnergy > simgrid::energy::HostEnergy::EXTENSION_ID
static

§ watts_off

double simgrid::energy::HostEnergy::watts_off = 0.0

§ total_energy

double simgrid::energy::HostEnergy::total_energy = 0.0

§ last_updated

double simgrid::energy::HostEnergy::last_updated

The documentation for this class was generated from the following files: