X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/67f1e9954d2703aa04372975974cf5c5150792eb..c52513a95d2f503e125b425e37fabaf11c046e9c:/src/surf/plugins/host_energy.cpp diff --git a/src/surf/plugins/host_energy.cpp b/src/surf/plugins/host_energy.cpp index d64ed6f12a..17fd032048 100644 --- a/src/surf/plugins/host_energy.cpp +++ b/src/surf/plugins/host_energy.cpp @@ -143,6 +143,8 @@ void HostEnergy::update() double energy_this_step = instantaneous_consumption * (finish_time - start_time); + //TODO Trace: Trace energy_this_step from start_time to finish_time in host->name() + this->total_energy = previous_energy + energy_this_step; this->last_updated = finish_time; this->pstate = host->pstate(); @@ -275,6 +277,9 @@ static void onCreation(simgrid::s4u::Host& host) { if (dynamic_cast(&host)) // Ignore virtual machines return; + + //TODO Trace: set to zero the energy variable associated to host->name() + host.extension_set(new HostEnergy(&host)); }