Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
start to use surf signals to trace resource usage
[simgrid.git] / src / instr / instr_resource_utilization.cpp
index 19468d23d8ecb067c8495add36f2a0e13dc68da0..a7068756cf6805ef949536c44877db3bac23e3b5 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2017. The SimGrid Team.
+/* Copyright (c) 2010-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -22,7 +22,7 @@ static void instr_event(double now, double delta, simgrid::instr::VariableType*
    */
 
   // create a key considering the resource and variable
-  std::string key = resource->getName() + variable->getName();
+  std::string key = resource->get_name() + variable->get_name();
 
   // check if key exists: if it doesn't, set the variable to zero and mark this in the global map.
   if (platform_variables.find(key) == platform_variables.end()) {
@@ -34,8 +34,8 @@ static void instr_event(double now, double delta, simgrid::instr::VariableType*
   variable->subEvent(now + delta, value);
 }
 
-static void TRACE_surf_resource_set_utilization(const char* type, const char* name, const char* resource,
-                                                const char* category, double value, double now, double delta)
+void TRACE_surf_resource_set_utilization(const char* type, const char* name, const char* resource, const char* category,
+                                         double value, double now, double delta)
 {
   // only trace resource utilization if resource is known by tracing mechanism
   container_t container = simgrid::instr::Container::byNameOrNull(resource);
@@ -65,9 +65,3 @@ void TRACE_surf_link_set_utilization(const char* resource, const char* category,
 {
   TRACE_surf_resource_set_utilization("LINK", "bandwidth_used", resource, category, value, now, delta);
 }
-
-/* TRACE_surf_host_set_utilization: entry point from SimGrid */
-void TRACE_surf_host_set_utilization(const char* resource, const char* category, double value, double now, double delta)
-{
-  TRACE_surf_resource_set_utilization("HOST", "power_used", resource, category, value, now, delta);
-}