pub fn measure_debug_span<T>(
state: &DebugStateRef,
log_state: &LogStateRef,
clock: &Arc<dyn Fn() -> f64 + Send + Sync>,
name: &str,
run: impl FnOnce() -> T,
channel: Option<String>,
) -> TExpand description
Times a synchronous function as one span while a debug session is active (TS
measureDebugSpan) and returns its result. With debug disabled the function still runs and only
the timing is skipped. The span is closed, and its entry emitted, even when the function panics
(the source’s throw), and the panic then resumes. clock is read once when the span opens and
once when it closes.