From: Martin Quinson Date: Tue, 9 Jun 2015 09:42:59 +0000 (+0200) Subject: MSG_host_get_pstate_number() -> MSG_host_get_pstate_count() X-Git-Tag: v3_12~640 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/5bcb2953d5a0cc02aa2004a429f126541cb760df MSG_host_get_pstate_number() -> MSG_host_get_pstate_count() --- diff --git a/ChangeLog b/ChangeLog index 455983dd86..7f070bb48e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,7 @@ SimGrid (3.12) NOT RELEASED; urgency=low - set_data_size(t) -> set_bytes_amount(t) get_data_size(t) -> get_bytes_amount(t) - Massive cleanups in the functions related to the energy + - MSG_host_get_pstate_number() -> MSG_host_get_pstate_count() jMSG: * Interface improvement: - Rename Host.isAvail() to Host.isOn() diff --git a/examples/msg/energy/pstate/pstate.c b/examples/msg/energy/pstate/pstate.c index f7e7cad81e..0b2a8b6628 100644 --- a/examples/msg/energy/pstate/pstate.c +++ b/examples/msg/energy/pstate/pstate.c @@ -38,8 +38,8 @@ int dvfs(int argc, char *argv[]) int new_peak_index=2; host = MSG_host_self();; //MSG_get_host_by_name("MyHost1"); - int nb = MSG_host_get_pstate_number(host); - XBT_INFO("Number of Processor states=%d", nb); + int nb = MSG_host_get_pstate_count(host); + XBT_INFO("Count of Processor states=%d", nb); double current_peak = MSG_host_get_current_power_peak(host); XBT_INFO("Current power peak=%f", current_peak); @@ -78,8 +78,8 @@ int dvfs(int argc, char *argv[]) // Verify the default pstate is set to 0 host = MSG_get_host_by_name("MyHost2"); - int nb2 = MSG_host_get_pstate_number(host); - XBT_INFO("Number of Processor states=%d", nb2); + int nb2 = MSG_host_get_pstate_count(host); + XBT_INFO("Count of Processor states=%d", nb2); double current_peak2 = MSG_host_get_current_power_peak(host); XBT_INFO("Current power peak=%f", current_peak2); diff --git a/include/simgrid/msg.h b/include/simgrid/msg.h index 4193fd27d1..9ea549243b 100644 --- a/include/simgrid/msg.h +++ b/include/simgrid/msg.h @@ -327,7 +327,7 @@ XBT_PUBLIC(void) __MSG_host_destroy(msg_host_t host); XBT_PUBLIC(double) MSG_host_get_power_peak_at(msg_host_t h, int pstate); XBT_PUBLIC(double) MSG_host_get_current_power_peak(msg_host_t h); -XBT_PUBLIC(int) MSG_host_get_pstate_number(msg_host_t h); +XBT_PUBLIC(int) MSG_host_get_pstate_count(msg_host_t h); XBT_PUBLIC(void) MSG_host_set_pstate(msg_host_t h, int pstate); XBT_PUBLIC(double) MSG_host_get_consumed_energy(msg_host_t h); diff --git a/src/msg/msg_host.c b/src/msg/msg_host.c index 0df4dbe162..6254436ee0 100644 --- a/src/msg/msg_host.c +++ b/src/msg/msg_host.c @@ -373,11 +373,11 @@ double MSG_host_get_current_power_peak(msg_host_t host) { } /** \ingroup m_host_management - * \brief Return the number of pstates defined for a host. See also @ref SURF_plugin_energy. + * \brief Return the total count of pstates defined for a host. See also @ref SURF_plugin_energy. * * \param host host to test */ -int MSG_host_get_pstate_number(msg_host_t host) { +int MSG_host_get_pstate_count(msg_host_t host) { xbt_assert((host != NULL), "Invalid parameters (host is NULL)"); return (simcall_host_get_nb_pstates(host));