Expand description
Lightweight startup milestone tracing (#3757).
Records named milestones against a single process-start instant and emits one summary line to the runtime log when the TUI enters its event loop. Milestones are buffered in memory because most of them occur before the runtime log is initialized; the summary is the artifact, not the events.
Functionsยง
- cold_
start_ ms - The pinned cold-start measurement, or
Noneif the event loop never began. - elapsed_
ms - Milliseconds since process start, or
Nonewhenmark_process_startwas never called. - log_
summary - Emit the buffered milestones as one summary line and clear the buffer. Called once the runtime log exists (just before the event loop starts).
- mark
- Record
labelat the current elapsed time since process start. No-op ifmark_process_startwas never called (e.g. non-interactive subcommands). - mark_
cold_ start - Pin the cold-start measurement. First call wins.
- mark_
process_ start - Pin the process-start instant. First call wins; later calls are no-ops so tests and alternate entry points cannot skew the timeline.