// We consider that the machine is then fully loaded. That's arbitrary but it avoids a NaN
cpu_load = 1;
else
- cpu_load = lmm_constraint_get_usage(host->pimpl_cpu->constraint()) / current_speed;
+ cpu_load = host->pimpl_cpu->constraint()->get_usage() / current_speed;
/** Divide by the number of cores here **/
cpu_load /= host->pimpl_cpu->coreCount();
{
xbt_assert(HostEnergy::EXTENSION_ID.valid(),
"The Energy plugin is not active. Please call sg_energy_plugin_init() during initialization.");
- double cpu_load = lmm_constraint_get_usage(host->pimpl_cpu->constraint()) / host->getSpeed();
+ double cpu_load = host->pimpl_cpu->constraint()->get_usage() / host->getSpeed();
return host->extension<HostEnergy>()->getCurrentWattsValue(cpu_load);
}
}