Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add an unused (for the moment) module file
[simgrid.git] / examples / msg / tracing / categories.c
index ecc22fb..b10abcc 100644 (file)
@@ -83,6 +83,13 @@ MSG_error_t test_all(const char *platform_file,
     MSG_set_channel_number(0);
     MSG_create_environment(platform_file);
   }
+  {
+    //declaring user categories with RGB colors
+    TRACE_category_with_color ("compute", "1 0 0"); //red
+    TRACE_category_with_color ("request", "0 1 0"); //green
+    TRACE_category_with_color ("data", "0 0 1");    //blue
+    TRACE_category_with_color ("finalize", "0 0 0");//black
+  }
   {                             /*   Application deployment */
     MSG_function_register("master", master);
     MSG_function_register("slave", slave);
@@ -106,21 +113,10 @@ int main(int argc, char *argv[])
     printf("example: %s msg_platform.xml msg_deployment.xml\n", argv[0]);
     exit(1);
   }
-  //starting the simulation tracing
-  TRACE_start();
-
-  //declaring user categories
-  TRACE_category("compute");
-  TRACE_category("request");
-  TRACE_category("data");
-  TRACE_category("finalize");
 
   res = test_all(argv[1], argv[2]);
   MSG_clean();
 
-  //ending the simulation tracing
-  TRACE_end();
-
   if (res == MSG_OK)
     return 0;
   else