SimGrid  3.21
Versatile Simulation of Distributed Systems
simgrid::plugin::HostLoad Class Reference

Public Member Functions

 HostLoad (simgrid::s4u::Host *ptr)
 
 ~HostLoad ()=default
 
 HostLoad ()=delete
 
 HostLoad (simgrid::s4u::Host &ptr)=delete
 
 HostLoad (simgrid::s4u::Host &&ptr)=delete
 
double get_current_load ()
 WARNING: This function does not guarantee that you have the real load at any time imagine all actions on your CPU terminate at time t. More...
 
double get_average_load ()
 
double get_computed_flops ()
 
double get_idle_time ()
 
double get_total_idle_time ()
 Return idle time since last reset. More...
 
void update ()
 Return idle time over the whole simulation. More...
 
void add_activity (simgrid::kernel::activity::ExecImplPtr activity)
 
void reset ()
 

Static Public Attributes

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

Constructor & Destructor Documentation

◆ HostLoad() [1/4]

simgrid::plugin::HostLoad::HostLoad ( simgrid::s4u::Host ptr)
inlineexplicit

◆ ~HostLoad()

simgrid::plugin::HostLoad::~HostLoad ( )
default

◆ HostLoad() [2/4]

simgrid::plugin::HostLoad::HostLoad ( )
delete

◆ HostLoad() [3/4]

simgrid::plugin::HostLoad::HostLoad ( simgrid::s4u::Host ptr)
explicitdelete

◆ HostLoad() [4/4]

simgrid::plugin::HostLoad::HostLoad ( simgrid::s4u::Host &&  ptr)
explicitdelete

Member Function Documentation

◆ get_current_load()

double simgrid::plugin::HostLoad::get_current_load ( )

WARNING: This function does not guarantee that you have the real load at any time imagine all actions on your CPU terminate at time t.

Your load is then 0. Then you query the load (still 0) and then another action starts (still at time t!). This means that the load was never really 0 (because the time didn't advance) but it will still be reported as 0.

So, use at your own risk.

◆ get_average_load()

double simgrid::plugin::HostLoad::get_average_load ( )
inline

◆ get_computed_flops()

double simgrid::plugin::HostLoad::get_computed_flops ( )
inline

◆ get_idle_time()

double simgrid::plugin::HostLoad::get_idle_time ( )
inline

◆ get_total_idle_time()

double simgrid::plugin::HostLoad::get_total_idle_time ( )
inline

Return idle time since last reset.

◆ update()

void simgrid::plugin::HostLoad::update ( )

Return idle time over the whole simulation.

◆ add_activity()

void simgrid::plugin::HostLoad::add_activity ( simgrid::kernel::activity::ExecImplPtr  activity)

◆ reset()

void simgrid::plugin::HostLoad::reset ( )

Member Data Documentation

◆ EXTENSION_ID

simgrid::xbt::Extension< simgrid::s4u::Host, HostLoad > simgrid::plugin::HostLoad::EXTENSION_ID
static

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