]> AND Public Git Repository - simgrid.git/blobdiff - src/instr/instr_platform.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Rename example, and update doc.
[simgrid.git] / src / instr / instr_platform.cpp
index c47e87966cd59b46dba1cec677aed93ce05618ed..d1a1a98fbc8492675fe69d76e7ac1f806eb46fde 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2021. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2010-2022. 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. */
@@ -15,7 +15,7 @@
 
 #include "src/instr/instr_private.hpp"
 #include "src/kernel/resource/CpuImpl.hpp"
-#include "src/surf/network_interface.hpp"
+#include "src/kernel/resource/StandardLinkImpl.hpp"
 #include "src/surf/surf_interface.hpp"
 
 #include <fstream>
@@ -210,6 +210,11 @@ void instr_new_value_for_user_state_type(const std::string& type_name, const cha
 namespace simgrid {
 namespace instr {
 
+/** @brief Creates a file with the topology of the platform file used for the simulator.
+ *
+ *  The graph topology will have the following properties: all hosts, links and routers of the platform file are mapped
+ *  to graph nodes; routes are mapped to edges. The platform's zones are not represented in the output.
+ */
 void platform_graph_export_graphviz(const std::string& output_filename)
 {
   auto* g     = xbt_graph_new_graph(0, nullptr);
@@ -344,7 +349,7 @@ static void on_action_state_change(kernel::resource::Action const& action,
       resource_set_utilization("HOST", "speed_used", cpu->get_cname(), action.get_category(), value,
                                action.get_last_update(), simgrid_get_clock() - action.get_last_update());
 
-    const kernel::resource::LinkImpl* link = dynamic_cast<kernel::resource::LinkImpl*>(resource);
+    const kernel::resource::StandardLinkImpl* link = dynamic_cast<kernel::resource::StandardLinkImpl*>(resource);
 
     if (link != nullptr)
       resource_set_utilization("LINK", "bandwidth_used", link->get_cname(), action.get_category(), value,