Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
please sonar, get_clock is a static method
authorSUTER Frederic <frederic.suter@cc.in2p3.fr>
Tue, 21 Sep 2021 09:32:06 +0000 (11:32 +0200)
committerSUTER Frederic <frederic.suter@cc.in2p3.fr>
Tue, 21 Sep 2021 09:32:06 +0000 (11:32 +0200)
26 files changed:
examples/cpp/actor-join/s4u-actor-join.cpp
examples/cpp/actor-stacksize/s4u-actor-stacksize.cpp
examples/cpp/app-chainsend/s4u-app-chainsend.cpp
examples/cpp/app-token-ring/s4u-app-token-ring.cpp
examples/cpp/cloud-capping/s4u-cloud-capping.cpp
examples/cpp/cloud-simple/s4u-cloud-simple.cpp
examples/cpp/comm-dependent/s4u-comm-dependent.cpp
examples/cpp/comm-host2host/s4u-comm-host2host.cpp
examples/cpp/comm-pingpong/s4u-comm-pingpong.cpp
examples/cpp/dht-chord/s4u-dht-chord.cpp
examples/cpp/dht-kademlia/s4u-dht-kademlia.cpp
teshsuite/kernel/context-defaults/context-defaults.cpp
teshsuite/mc/mutex-handling/mutex-handling.cpp
teshsuite/s4u/actor-autorestart/actor-autorestart.cpp
teshsuite/s4u/actor/actor.cpp
teshsuite/s4u/cloud-interrupt-migration/cloud-interrupt-migration.cpp
teshsuite/s4u/cloud-two-execs/cloud-two-execs.cpp
teshsuite/s4u/comm-pt2pt/comm-pt2pt.cpp
teshsuite/s4u/concurrent_rw/concurrent_rw.cpp
teshsuite/s4u/host-multicore-speed-file/host-multicore-speed-file.cpp
teshsuite/s4u/host-on-off-actors/host-on-off-actors.cpp
teshsuite/s4u/host-on-off-recv/host-on-off-recv.cpp
teshsuite/s4u/host-on-off/host-on-off.cpp
teshsuite/s4u/storage_client_server/storage_client_server.cpp
teshsuite/surf/surf_usage/surf_usage.cpp
teshsuite/surf/surf_usage2/surf_usage2.cpp

index 5889f44..ec7a9dd 100644 (file)
@@ -59,7 +59,7 @@ int main(int argc, char* argv[])
 
   e.run();
 
-  XBT_INFO("Simulation time %g", e.get_clock());
+  XBT_INFO("Simulation time %g", sg4::Engine::get_clock());
 
   return 0;
 }
index e530466..81e7b87 100644 (file)
@@ -39,7 +39,7 @@ int main(int argc, char* argv[])
   sg4::Actor::create("actor", e.host_by_name("Tremblay"), actor);
 
   e.run();
-  XBT_INFO("Simulation time %g", e.get_clock());
+  XBT_INFO("Simulation time %g", sg4::Engine::get_clock());
 
   return 0;
 }
index 0cd70a8..47525dd 100644 (file)
@@ -173,7 +173,7 @@ int main(int argc, char* argv[])
   simgrid::s4u::Actor::create("peer", e.host_by_name("node-8.simgrid.org"), peer);
 
   e.run();
-  XBT_INFO("Total simulation time: %e", e.get_clock());
+  XBT_INFO("Total simulation time: %e", simgrid::s4u::Engine::get_clock());
 
   return 0;
 }
index 601f062..6766af4 100644 (file)
@@ -66,7 +66,7 @@ int main(int argc, char** argv)
     id++;
   }
   e.run();
-  XBT_INFO("Simulation time %g", e.get_clock());
+  XBT_INFO("Simulation time %g", simgrid::s4u::Engine::get_clock());
 
   return 0;
 }
index b7c7b8b..a3da18d 100644 (file)
@@ -253,7 +253,7 @@ int main(int argc, char* argv[])
   simgrid::s4u::Actor::create("master_", e.host_by_name("Fafard"), master_main);
 
   e.run();
-  XBT_INFO("Bye (simulation time %g)", e.get_clock());
+  XBT_INFO("Bye (simulation time %g)", simgrid::s4u::Engine::get_clock());
 
   return 0;
 }
index 3df190d..6ef3e2c 100644 (file)
@@ -216,7 +216,7 @@ int main(int argc, char* argv[])
 
   e.run();
 
-  XBT_INFO("Simulation time %g", e.get_clock());
+  XBT_INFO("Simulation time %g", simgrid::s4u::Engine::get_clock());
 
   return 0;
 }
index 7ce73aa..a421d13 100644 (file)
@@ -48,7 +48,7 @@ int main(int argc, char* argv[])
 
   e.run();
 
-  XBT_INFO("Simulation time: %.3f", e.get_clock());
+  XBT_INFO("Simulation time: %.3f", sg4::Engine::get_clock());
 
   return 0;
 }
index 5db7a66..cde4cfb 100644 (file)
@@ -67,7 +67,7 @@ int main(int argc, char* argv[])
 
   e.run();
 
-  XBT_INFO("Total simulation time: %.3f", e.get_clock());
+  XBT_INFO("Total simulation time: %.3f", sg4::Engine::get_clock());
 
   return 0;
 }
index dfc717f..5233d43 100644 (file)
@@ -54,7 +54,7 @@ int main(int argc, char* argv[])
 
   e.run();
 
-  XBT_INFO("Total simulation time: %.3f", e.get_clock());
+  XBT_INFO("Total simulation time: %.3f", sg4::Engine::get_clock());
 
   return 0;
 }
index 8b4ae5f..73f797b 100644 (file)
@@ -45,6 +45,6 @@ int main(int argc, char* argv[])
 
   e.run();
 
-  XBT_INFO("Simulated time: %g", e.get_clock());
+  XBT_INFO("Simulated time: %g", simgrid::s4u::Engine::get_clock());
   return 0;
 }
index c6dc149..0b92ef4 100644 (file)
@@ -85,7 +85,7 @@ int main(int argc, char* argv[])
 
   e.run();
 
-  XBT_INFO("Simulated time: %g", e.get_clock());
+  XBT_INFO("Simulated time: %g", simgrid::s4u::Engine::get_clock());
 
   return 0;
 }
index af1722e..ee9d6b1 100644 (file)
@@ -13,7 +13,6 @@ int main(int argc, char* argv[])
 {
   xbt_log_control_set("root.fmt:[%c/%p]%e%m%n");
   xbt_log_control_set("simix_context.threshold:verbose");
-  simgrid::s4u::Engine e(&argc, argv);
-  e.get_clock(); // just to use the engine once.
+  XBT_ATTRIB_UNUSED simgrid::s4u::Engine e(&argc, argv);
   return 0;
 }
index 236c5f3..49d6da6 100644 (file)
@@ -74,7 +74,7 @@ int main(int argc, char* argv[])
   simgrid::s4u::Actor::create("sender", e.host_by_name("Fafard"), sender, "box", mutex, 2);
 
   e.run();
-  XBT_INFO("Simulation time %g", e.get_clock());
+  XBT_INFO("Simulation time %g", simgrid::s4u::Engine::get_clock());
 
   return 0;
 }
index 65a5464..048a698 100644 (file)
@@ -59,7 +59,7 @@ int main(int argc, char* argv[])
   simgrid::s4u::Actor::create("Autostart", e.host_by_name("Tremblay"), autostart);
 
   e.run();
-  XBT_INFO("Simulation time %g", e.get_clock());
+  XBT_INFO("Simulation time %g", simgrid::s4u::Engine::get_clock());
 
   return 0;
 }
index 0bbc753..23c84b2 100644 (file)
@@ -60,7 +60,7 @@ int main(int argc, char* argv[])
   simgrid::s4u::Actor::create("worker", e.host_by_name("Tremblay"), worker);
 
   e.run();
-  XBT_INFO("Simulation time %g", e.get_clock());
+  XBT_INFO("Simulation time %g", simgrid::s4u::Engine::get_clock());
 
   return 0;
 }
index 019b100..7a7c206 100644 (file)
@@ -65,7 +65,7 @@ int main(int argc, char* argv[])
 
   e.run();
 
-  XBT_INFO("Bye (simulation time %g)", e.get_clock());
+  XBT_INFO("Bye (simulation time %g)", simgrid::s4u::Engine::get_clock());
 
   return 0;
 }
index 2114719..9e38bce 100644 (file)
@@ -58,7 +58,7 @@ int main(int argc, char* argv[])
   simgrid::s4u::Actor::create("master_", e.host_by_name("Fafard"), master_main);
 
   e.run();
-  XBT_INFO("Bye (simulation time %g)", e.get_clock());
+  XBT_INFO("Bye (simulation time %g)", simgrid::s4u::Engine::get_clock());
 
   return 0;
 }
index 5ccfa0c..6fbc607 100644 (file)
@@ -186,7 +186,7 @@ int main(int argc, char* argv[])
   simgrid::s4u::Actor::create("recver", hosts[1], receiver, argRecv);
 
   e.run();
-  XBT_INFO("Simulation time %g", e.get_clock());
+  XBT_INFO("Simulation time %g", simgrid::s4u::Engine::get_clock());
 
   return 0;
 }
index d86661d..9924a39 100644 (file)
@@ -38,7 +38,7 @@ int main(int argc, char** argv)
     sg4::Actor::create("host", e.host_by_name("bob"), host);
 
   e.run();
-  XBT_INFO("Simulation time %g", e.get_clock());
+  XBT_INFO("Simulation time %g", sg4::Engine::get_clock());
 
   return 0;
 }
index 468c98f..ed67673 100644 (file)
@@ -107,7 +107,7 @@ int main(int argc, char* argv[])
 
   e.run();
 
-  XBT_INFO("Simulation time %g", e.get_clock());
+  XBT_INFO("Simulation time %g", sg4::Engine::get_clock());
 
   return 0;
 }
index e5ad474..f2542d5 100644 (file)
@@ -163,7 +163,7 @@ int main(int argc, char* argv[])
 
   e.run();
 
-  XBT_INFO("Simulation time %g", e.get_clock());
+  XBT_INFO("Simulation time %g", simgrid::s4u::Engine::get_clock());
 
   return 0;
 }
index 19de43d..5e2d38f 100644 (file)
@@ -61,7 +61,7 @@ int main(int argc, char* argv[])
 
   e.run();
 
-  XBT_INFO("Simulation time %g", e.get_clock());
+  XBT_INFO("Simulation time %g", simgrid::s4u::Engine::get_clock());
 
   return 0;
 }
index 860df76..00f9307 100644 (file)
@@ -99,7 +99,7 @@ int main(int argc, char* argv[])
 
   e.run();
 
-  XBT_INFO("Simulation time %g", e.get_clock());
+  XBT_INFO("Simulation time %g", simgrid::s4u::Engine::get_clock());
 
   return 0;
 }
index 8c1f927..55554e4 100644 (file)
@@ -154,6 +154,6 @@ int main(int argc, char* argv[])
 
   e.run();
 
-  XBT_INFO("Simulated time: %g", e.get_clock());
+  XBT_INFO("Simulated time: %g", simgrid::s4u::Engine::get_clock());
   return 0;
 }
index fbfac17..5735095 100644 (file)
@@ -71,7 +71,7 @@ int main(int argc, char** argv)
 
   surf_solve(-1.0);
   do {
-    XBT_INFO("Next Event : %g", e.get_clock());
+    XBT_INFO("Next Event : %g", simgrid::s4u::Engine::get_clock());
     XBT_DEBUG("\t CPU actions");
 
     simgrid::kernel::resource::Action::StateSet* action_list = cpu_model_pm->get_failed_action_set();
index 6faa675..18bc5b0 100644 (file)
@@ -48,7 +48,7 @@ int main(int argc, char** argv)
     simgrid::kernel::resource::Action* action = nullptr;
     running                                   = 0;
 
-    double now = e.get_clock();
+    double now = simgrid::s4u::Engine::get_clock();
     XBT_INFO("Next Event : %g", now);
 
     for (auto const& model : e.get_all_models()) {