pub fn set_trace_enabled(enabled: bool) -> boolExpand description
Enables or disables task timing trace collection at runtime.
When transitioning from enabled to disabled, add_task_timing becomes a
cheaper since only cheap statistics are gathered. The existing per-thread
buffers for traces are cleared so stale data isn’t reported after a later
re-enable. Calls with the current value are a no-op.