ExecPtr set_bound(double bound);
ExecPtr set_host(Host* host);
ExecPtr set_name(std::string name);
+ ExecPtr set_tracing_category(std::string category);
Host* get_host();
double get_remaining() override;
surf_action_->set_priority(priority);
}
+void simgrid::kernel::activity::ExecImpl::set_category(std::string category)
+{
+ if (surf_action_)
+ surf_action_->set_category(category);
+}
+
void simgrid::kernel::activity::ExecImpl::post()
{
if (host_ && host_->is_off()) { /* FIXME: handle resource failure for parallel tasks too */
double get_remaining_ratio();
void set_bound(double bound);
void set_priority(double priority);
+ void set_category(std::string category);
virtual ActivityImpl* migrate(s4u::Host* to);
/* The host where the execution takes place. nullptr means this is a parallel exec (and only surf knows the hosts) */
return this;
}
+ExecPtr Exec::set_tracing_category(std::string category)
+{
+ xbt_assert(state_ == State::INITED, "Cannot change the name of an exec after its start");
+ if (category.empty())
+ return this;
+
+ simgrid::simix::simcall([this, category] {
+ boost::static_pointer_cast<simgrid::kernel::activity::ExecImpl>(pimpl_)->set_category(category);
+ });
+ return this;
+}
+
/** @brief Retrieve the host on which this activity takes place. */
Host* Exec::get_host()
{