Expand description
harn time — wrap a subcommand with structured phase timing.
Today only harn time run is supported. The wrapper enables both VM
and LLM tracing, drives the run through the same code path as
harn run, and emits a versioned JsonEnvelope with per-phase
wall-clock + cache hit/miss + per-LLM-call + per-tool-call latency.
Phases are emitted in fixed order — parse, typecheck,
bytecode_compile, run_setup, run_main — even when a cache hit
lets us skip parse/typecheck. That keeps consumers’ shape stable so
phases.length >= 5 is a safe assertion and cache: "hit" always
lives on the bytecode_compile row.
Structs§
- LlmCall
Timing - Phase
Record - RunTiming
- Per-phase wall-clock samples recorded by the run path. Filled in by
crate::commands::runwhen timing is requested; absent fields (e.g. parse on a cache hit) stay zero. - Timing
Report - Timing
Totals - Tool
Call Timing
Constants§
- TIME_
RUN_ SCHEMA_ VERSION - Schema version for the
harn time run --jsonenvelope. Bump when theTimingReportshape changes in a way agents must detect.