SimGrid: Tracing categories

SimGrid 3.10 Versatile Simulation of Distributed Systems

- Home page
- Online documentation
- Dev's Corner

All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Functions
Tracing categories
TRACE

Functions to declare tracing categories. More...

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

## Detailed Description

Functions to declare tracing categories.

## Function Documentation

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 Tracing Simulations for details on how to trace the (categorized) resource utilization.

Parameters

  category | The name of the new tracing category to be created.

See Also
  TRACE_category_with_color, MSG_task_set_category, SD_task_set_category

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 Tracing Simulations for details on how to trace the (categorized) resource utilization.

Parameters

  category | The name of the new tracing category to be created.
  color | The color of the category (see Tracing Simulations to know how to correctly specify the color)

See Also
  MSG_task_set_category, SD_task_set_category

xbt_dynar_t TRACE_get_categories | ( | void |  | ) |

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 Tracing Simulations 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