are fullfiled. If it cannot be started right away, it will start as soon as it becomes
possible.
- Allow to set a concurrency limit on disks and hosts, as it was already the case for links.
+ - Rename Link::get_usage() to Link::get_load() for consistency with Host::
Kernel:
- optimize an internal datastructure (use a set instead of a list for ongoing activities),
void set_host_wifi_rate(const s4u::Host* host, int level) const;
/** @brief Returns the current load (in bytes per second) */
- double get_usage() const;
+ double get_load() const;
+
+#ifndef DOXYGEN
+ XBT_ATTRIB_DEPRECATED_v337("Please use get_load() instead") double get_usage() const
+ {
+ return get_load();
+ }
+#endif
/** @brief Check if the Link is used (at least one flow uses the link) */
bool is_used() const;
* If the resource is not shared (ie in FATPIPE mode), then the load is the max (not the sum)
* of all resource usages located on this resource.
*/
-double Constraint::get_usage() const
+double Constraint::get_load() const
{
double result = 0.0;
if (sharing_policy_ != SharingPolicy::FATPIPE) {
/** @brief Check how a constraint is shared */
SharingPolicy get_sharing_policy() const { return sharing_policy_; }
- /** @brief Get the usage of the constraint after the last lmm solve */
- double get_usage() const;
+ /** @brief Get the load of the constraint after the last lmm solve */
+ double get_load() const;
/** @brief Sets the concurrency limit for this constraint */
void set_concurrency_limit(int limit)
/** @brief returns the current load due to activities (in flops per second, byte per second or similar)
*
* The load due to external usages modeled by profile files is ignored.*/
- virtual double get_load() const { return constraint_->get_usage(); }
+ virtual double get_load() const { return constraint_->get_load(); }
bool is_used() const override { return model_->get_maxmin_system()->constraint_used(constraint_); }
};
double power_slope = busy_ - idle_;
- double normalized_link_usage = link_->get_usage() / link_->get_bandwidth();
+ double normalized_link_usage = link_->get_load() / link_->get_bandwidth();
double dynamic_power = power_slope * normalized_link_usage;
return idle_ + dynamic_power;
* - if idle i.e. get_usage = 0, update P_{stat}
* P_{tot} = P_{dyn}+P_{stat}
*/
- if (link_->get_usage() != 0.0) {
+ if (link_->get_load() != 0.0) {
eDyn_ += /*duration * */ durUsage * ((host_count * pRx_) + pTx_);
eStat_ += (duration - durUsage) * pIdle_ * (host_count + 1);
XBT_DEBUG("eDyn += %f * ((%f * %f) + %f) | eDyn = %f (durusage =%f)", durUsage, host_count, pRx_, pTx_, eDyn_,
" Please track your link with sg_link_load_track before trying to access any of its load metrics.",
link_->get_cname());
- double current_instantaneous_bytes_per_second = link_->get_usage();
+ double current_instantaneous_bytes_per_second = link_->get_load();
double now = simgrid::s4u::Engine::get_clock();
// Update minimum/maximum observed values if needed
return this;
}
-double Link::get_usage() const
+double Link::get_load() const
{
- return this->pimpl_->get_constraint()->get_usage();
+ return this->pimpl_->get_constraint()->get_load();
}
void Link::turn_on()