TimespanLogging Functions

Basic Functions

TimespanLogging.timespan_startFunction
timespan_start(ctx, category::Symbol, id, tl)

Legacy emit path. When the sink is NoOpLog, this is a no-op (and @maybelog already skipped constructing id/tl). Otherwise the event is appended to the calling thread's legacy chunk list — no process-wide lock, no consumer dispatch, no ProfilerResult allocation.

source
TimespanLogging.timespan_finishFunction
timespan_finish(ctx, category::Symbol, id, tl; tasks=nothing)

Legacy finish path. Profiling (profile(ctx, ...)) still uses the old Profile.fetch machinery; the common path only stores a typed-enough legacy record.

source
TimespanLogging.get_logs!Function
get_logs!(ctx; kwargs...)
get_logs!(sink; kwargs...)

Get the logs recorded by ctx's (or sink's) log sink, clearing them in the process. Recording is always into per-thread buffers regardless of sink; get_logs! is what steals and projects them into the sink's own log shape (a Vector{Timespan} for LocalEventLog, a Dict of consumer name to per-event values for MultiEventLog, nothing for NoOpLog). See the sink's own docstring for sink-specific keyword arguments (e.g. raw and only_local on LocalEventLog).

source

Logging Metric Functions