SimGrid  3.14.159
Versatile Simulation of Distributed Systems
energy.cpp File Reference
#include "simgrid/plugins/energy.h"
#include "simgrid/simix.hpp"
#include "src/plugins/vm/VirtualMachineImpl.hpp"
#include "src/surf/cpu_interface.hpp"
#include "src/surf/plugins/energy.hpp"
#include <utility>

Namespaces

 simgrid
 Host datatype from SIMIX POV.
 
 simgrid::energy
 

Functions

 XBT_LOG_NEW_DEFAULT_SUBCATEGORY (surf_energy, surf, "Logging specific to the SURF energy plugin")
 
static void onCreation (simgrid::s4u::Host &host)
 
static void onActionStateChange (simgrid::surf::CpuAction *action, simgrid::surf::Action::State previous)
 
static void onHostStateChange (simgrid::s4u::Host &host)
 
static void onHostDestruction (simgrid::s4u::Host &host)
 
void sg_energy_plugin_init ()
 Enable energy plugin. More...
 
double sg_host_get_consumed_energy (sg_host_t host)
 Returns the total energy consumed by the host so far (in Joules) More...
 
double sg_host_get_wattmin_at (sg_host_t host, int pstate)
 Get the amount of watt dissipated at the given pstate when the host is idling. More...
 
double sg_host_get_wattmax_at (sg_host_t host, int pstate)
 Returns the amount of watt dissipated at the given pstate when the host burns CPU at 100%. More...
 

Function Documentation

◆ XBT_LOG_NEW_DEFAULT_SUBCATEGORY()

XBT_LOG_NEW_DEFAULT_SUBCATEGORY ( surf_energy  ,
surf  ,
"Logging specific to the SURF energy plugin"   
)

◆ onCreation()

static void onCreation ( simgrid::s4u::Host host)
static

◆ onActionStateChange()

static void onActionStateChange ( simgrid::surf::CpuAction action,
simgrid::surf::Action::State  previous 
)
static

◆ onHostStateChange()

static void onHostStateChange ( simgrid::s4u::Host host)
static

◆ onHostDestruction()

static void onHostDestruction ( simgrid::s4u::Host host)
static

◆ sg_host_get_consumed_energy()

double sg_host_get_consumed_energy ( sg_host_t  host)

Returns the total energy consumed by the host so far (in Joules)

See also SURF Energy Plugin.

◆ sg_host_get_wattmin_at()

double sg_host_get_wattmin_at ( sg_host_t  host,
int  pstate 
)

Get the amount of watt dissipated at the given pstate when the host is idling.

◆ sg_host_get_wattmax_at()

double sg_host_get_wattmax_at ( sg_host_t  host,
int  pstate 
)

Returns the amount of watt dissipated at the given pstate when the host burns CPU at 100%.