#include "simgrid/plugins/energy.h"
#include "simgrid/plugins/load.h"
#include "simgrid/s4u/Engine.hpp"
+#include "src/include/surf/surf.hpp"
#include "src/plugins/vm/VirtualMachineImpl.hpp"
#include "src/surf/cpu_interface.hpp"
if (this->pstate_ == pstate_off_) // The host is off (or was off at the beginning of this time interval)
return this->watts_off_;
- double current_speed = host_->getSpeed();
+ double current_speed = host_->get_speed();
double cpu_load;
// We may have start == finish if the past consumption was updated since the simcall was started
double power_slope = 0;
if (cpu_load > 0) { /* Something is going on, the machine is not idle */
- double min_power = range.min_;
- double max_power = range.max_;
+ min_power = range.min_;
+ max_power = range.max_;
/**
* The min_power states how much we consume when only one single
host.extension_set(new HostEnergy(&host));
}
-static void on_action_state_change(simgrid::surf::CpuAction* action)
+static void on_action_state_change(simgrid::surf::CpuAction* action,
+ simgrid::kernel::resource::Action::State /*previous*/)
{
for (simgrid::surf::Cpu* const& cpu : action->cpus()) {
simgrid::s4u::Host* host = cpu->get_host();