SimGrid  3.16
Versatile Simulation of Distributed Systems
Tracing categories

Detailed Description

Functions to declare tracing categories.

Functions

void TRACE_category (const char *category)
 Declare a new category with a random color. More...
 
void TRACE_category_with_color (const char *category, const char *color)
 Declare a new category with a color. More...
 
xbt_dynar_t TRACE_get_categories ()
 Get declared categories. More...
 

Function Documentation

◆ TRACE_category()

void TRACE_category ( const char *  category)

Declare a new category with a random color.

This function should be used to define a user category. The category can be used to differentiate the tasks that are created during the simulation (for example, tasks from server1, server2, or request tasks, computation tasks, communication tasks). All resource utilization (host power and link bandwidth) will be classified according to the task category. Tasks that do not belong to a category are not traced. The color for the category that is being declared is random. This function has no effect if a category with the same name has been already declared.

See Visualization and Statistical Analysis for details on how to trace the (categorized) resource utilization.

Parameters
categoryThe name of the new tracing category to be created.
See also
TRACE_category_with_color, MSG_task_set_category, SD_task_set_category

◆ TRACE_category_with_color()

void TRACE_category_with_color ( const char *  category,
const char *  color 
)

Declare a new category with a color.

Same as TRACE_category, but let user specify a color encoded as a RGB-like string with three floats from 0 to 1. So, to specify a red color, pass "1 0 0" as color parameter. A light-gray color can be specified using "0.7 0.7 0.7" as color. This function has no effect if a category with the same name has been already declared.

See Visualization and Statistical Analysis for details on how to trace the (categorized) resource utilization.

Parameters
categoryThe name of the new tracing category to be created.
colorThe color of the category (see Visualization and Statistical Analysis to know how to correctly specify the color)
See also
MSG_task_set_category, SD_task_set_category

◆ TRACE_get_categories()

xbt_dynar_t TRACE_get_categories ( )

Get declared categories.

This function should be used to get categories that were already declared with TRACE_category or with TRACE_category_with_color.

See Visualization and Statistical Analysis for details on how to trace the (categorized) resource utilization.

Returns
A dynar with the declared categories, must be freed with xbt_dynar_free.
See also
MSG_task_set_category, SD_task_set_category