- //only trace host utilization if host is known by tracing mechanism
- container_t container = simgrid::instr::Container::byNameOrNull(resource);
- if (not container || not value)
- return;
-
- //trace uncategorized host utilization
- if (TRACE_uncategorized()){
- XBT_DEBUG("UNCAT HOST [%f - %f] %s power_used %f", now, now+delta, resource, value);
- simgrid::instr::Type* type = container->type_->byName("power_used");
- instr_event (now, delta, type, container, value);
- }
+ TRACE_surf_resource_set_utilization("LINK", "bandwidth_used", resource, category, value, now, delta);
+}