Record per-step duration in trace and operational logs #35
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Trace and operational logs record an ISO
timestampper step but not how long each step took. Operators have to compute durations by subtracting consecutive timestamps in the JSONL trace, which is awkward and impossible from a single log line.Goal
First-class
duration_mson each*_completetrace step, plus atotal_duration_secon the terminalcompletestep. Mirrors automatically into operational logs because they're emitted from the sameTraceLogger.log_stepcall.Pairings
web_searchweb_search_completefetch_urlfetch_url_completesynthesis_startsynthesis_complete/synthesis_errorstartcompletetotal_duration_sec)Iteration durations are derivable from consecutive
iteration_starttimestamps; not addressed here.Implementation
TraceLoggertracks a small dict of starter action → start time (monotonic)_execute_toolruns start→end before returning), so a simple dict works without queueingTests
duration_ms(ortotal_duration_sec) on the completer