- if (!surf_action->category)
- return;
- char type[100];
- snprintf(type, 100, "p%s", surf_action->category);
- DEBUG5("CAT HOST [%f - %f] %s %s %f", now, now+delta, name, type, value);
- TRACE_surf_resource_utilization_event(smx_action, now, delta, type, name,
- value);
+ if (TRACE_categorized()){
+ if (!surf_action->category)
+ return;
+
+ char cat_p_used_type[INSTR_DEFAULT_STR_SIZE];
+ snprintf (cat_p_used_type, INSTR_DEFAULT_STR_SIZE, "%s-%s", surf_action->category, host_type);
+
+ DEBUG5("CAT HOST [%f - %f] %s %s %f", now, now+delta, resource, cat_p_used_type, value);
+ TRACE_surf_resource_utilization_event(smx_action, now, delta, cat_p_used_type, resource,
+ value);
+ }