X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c6f2914980450d19e7b47590a88698bb2b30e5c6..afb694bd672b9e44c91455cf4c3eb76c9e7b960a:/src/instr/instr_interface.cpp diff --git a/src/instr/instr_interface.cpp b/src/instr/instr_interface.cpp index 20a9c897a0..106acd4c31 100644 --- a/src/instr/instr_interface.cpp +++ b/src/instr/instr_interface.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2010-2022. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2010-2023. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -17,11 +17,11 @@ enum class InstrUserVariable { DECLARE, SET, ADD, SUB }; XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_api, instr, "API"); -std::set> created_categories; -std::set> declared_marks; -std::set> user_host_variables; -std::set> user_vm_variables; -std::set> user_link_variables; +static std::set> created_categories; +static std::set> declared_marks; +static std::set> user_host_variables; +static std::set> user_vm_variables; +static std::set> user_link_variables; static void instr_user_variable(double time, const std::string& resource, const std::string& variable_name, const std::string& parent_type, double value, InstrUserVariable what, @@ -75,8 +75,7 @@ static void instr_user_srcdst_variable(double time, const std::string& src, cons instr_user_variable(time, link->get_cname(), variable, "LINK", value, what, "", &user_link_variables); } -namespace simgrid { -namespace instr { +namespace simgrid::instr { /* for host variables */ /** @brief Declare a new user variable associated to hosts. * @@ -313,7 +312,7 @@ void declare_tracing_category(const std::string& name, const std::string& color) double blue = simgrid::xbt::random::uniform_real(0.0, std::nextafter(1.0, 2.0)); final_color = std::to_string(red) + " " + std::to_string(green) + " " + std::to_string(blue); } else { - final_color = std::string(color); + final_color = color; } XBT_DEBUG("CAT,declare %s, \"%s\" \"%s\"", name.c_str(), color.c_str(), final_color.c_str()); @@ -331,8 +330,7 @@ const std::set>& get_tracing_categories() return created_categories; } -} // namespace instr -} // namespace simgrid +} // namespace simgrid::instr static xbt_dynar_t instr_set_to_dynar(const std::set>& filter) // XBT_ATTRIB_DEPRECATED_v334 {