X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/eefc25aa1c98cbb7458cbf5d38007470e3bef7d0..4576fd50919e2cffe68e4b86943709f42eaea60f:/src/s4u/s4u_Host.cpp diff --git a/src/s4u/s4u_Host.cpp b/src/s4u/s4u_Host.cpp index cdbc5a9f9c..3ac5c472ff 100644 --- a/src/s4u/s4u_Host.cpp +++ b/src/s4u/s4u_Host.cpp @@ -223,17 +223,24 @@ void Host::set_property(std::string key, std::string value) /** @brief Get the peak processor speed (in flops/s), at the specified pstate */ double Host::getPstateSpeed(int pstate_index) { - return simgrid::simix::simcall([this, pstate_index] { return this->pimpl_cpu->getPstateSpeed(pstate_index); }); + return simgrid::simix::simcall([this, pstate_index] { return this->pimpl_cpu->get_pstate_peak_speed(pstate_index); }); } -/** @brief Get the peak processor speed in flops/s, (under full load (=1.0), at the current pstate) */ +/** @brief Get the peak processor speed in flops/s, (under full load (=1.0), at the current pstate) + * + * The result also takes the external load into account. + */ double Host::getSpeed() { - return this->pimpl_cpu->getSpeed(1.0); + return this->pimpl_cpu->get_speed(1.0); } +/** @brief Get the available speed ratio, between 0 and 1. + * + * This accounts for external load (see @ref set_speed_trace()). + */ double Host::get_available_speed() { - return this->pimpl_cpu->get_available_speed(); + return this->pimpl_cpu->get_speed_ratio(); } /** @brief Returns the number of core of the processor. */