X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/98b96e960102644def66b7e75f084626d557ae4b..3f88afa7ab43c9ff2d4c4d0cece067863998ad68:/src/instr/instr_resource_utilization.cpp diff --git a/src/instr/instr_resource_utilization.cpp b/src/instr/instr_resource_utilization.cpp index d9d96fc8f7..8ab07eb7c4 100644 --- a/src/instr/instr_resource_utilization.cpp +++ b/src/instr/instr_resource_utilization.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2010-2018. The SimGrid Team. +/* Copyright (c) 2010-2020. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -9,11 +9,13 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_resource, instr, "tracing (un)-categorized resource utilization"); -void TRACE_surf_resource_set_utilization(const char* type, const char* name, const char* resource, std::string category, - double value, double now, double delta) +namespace simgrid { +namespace instr { +void resource_set_utilization(const char* type, const char* name, const char* resource, const std::string& category, + double value, double now, double delta) { // only trace resource utilization if resource is known by tracing mechanism - container_t container = simgrid::instr::Container::by_name_or_null(resource); + container_t container = Container::by_name_or_null(resource); if (not container || not value) return; @@ -24,9 +26,11 @@ void TRACE_surf_resource_set_utilization(const char* type, const char* name, con } // trace categorized resource utilization - if (TRACE_categorized() && !category.empty()) { + if (TRACE_categorized() && not category.empty()) { std::string category_type = name[0] + category; XBT_DEBUG("CAT %s [%f - %f] %s %s %f", type, now, now + delta, resource, category_type.c_str(), value); container->get_variable(name)->instr_event(now, delta, resource, value); } } +} // namespace instr +} // namespace simgrid