X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f119efea1c24d44adf55f31ca2ba7e15c6c15d84..c90aba67a7dd5458a2d7b2e31b54735f5311f787:/src/plugins/host_load.cpp diff --git a/src/plugins/host_load.cpp b/src/plugins/host_load.cpp index f881f1d235..2188d2c06d 100644 --- a/src/plugins/host_load.cpp +++ b/src/plugins/host_load.cpp @@ -68,7 +68,7 @@ public: explicit HostLoad(simgrid::s4u::Host& ptr) = delete; explicit HostLoad(simgrid::s4u::Host&& ptr) = delete; - double get_current_load(); + double get_current_load() const; /** Get the the average load since last reset(), as a ratio * * That's the ratio (amount of flops that were actually computed) / (amount of flops that could have been computed at full speed) @@ -168,7 +168,7 @@ void HostLoad::update() * But still, if you call this function between the two events (in the simulator course), it * returns 0 although there is no time (in the simulated time) where this value is valid. */ -double HostLoad::get_current_load() +double HostLoad::get_current_load() const { // We don't need to call update() here because it is called every time an action terminates or starts return current_flops_ / (host_->get_speed() * host_->get_core_count());