Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
tracing TODO marks
authorLucas M. Schnorr <schnorr@inf.ufrgs.br>
Tue, 28 Mar 2017 07:39:28 +0000 (09:39 +0200)
committerLucas M. Schnorr <schnorr@inf.ufrgs.br>
Tue, 28 Mar 2017 07:39:41 +0000 (09:39 +0200)
src/surf/plugins/host_energy.cpp

index d64ed6f..17fd032 100644 (file)
@@ -143,6 +143,8 @@ void HostEnergy::update()
 
   double energy_this_step = instantaneous_consumption * (finish_time - start_time);
 
 
   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();
   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<simgrid::s4u::VirtualMachine*>(&host)) // Ignore virtual machines
     return;
 {
   if (dynamic_cast<simgrid::s4u::VirtualMachine*>(&host)) // Ignore virtual machines
     return;
+
+  //TODO Trace: set to zero the energy variable associated to host->name()
+
   host.extension_set(new HostEnergy(&host));
 }
 
   host.extension_set(new HostEnergy(&host));
 }