Expand description
The record of where one wrapped commit spent its time,
appended beside the discard audit.
What:
The record of where one wrapped git commit spent its time,
appended to a size-capped file in the common Git directory
beside the discard audit:
preparation,
building,
setting up the service,
reaching it,
waiting for its answer,
the work
after landing,
the post-commit gate and the hand-over of the push.
Why:
A commit that took seventeen seconds could not be split afterwards,
because nothing outside verbose mode said which phase
held the time.
The numbers are taken from the monotonic clock as the commit runs (one Instant read per phase edge,
no
Git start,
no flush to disk) and written once,
in one append,
when the command ends.
The record goes to the file only:
the person’s terminal never shows it.
In TS you’d write (pseudocode):
await appendFile(join(commonDir, 'cli-git-commit-timing.jsonl'), JSON.stringify(timing) + '\n');Structs§
- Commit
Timing - What:
The phases of one wrapped commit,
filled as the commit runs and written when it ends.
Why:
Each field is one disjoint stretch of the command,
so the phases add up to no more than the total,
and what they do not
cover is reported as
otherMsinstead of being hidden. - Reach
Trace - What: What the client did to reach a service that speaks its protocol and was started from its release. Why: The 17-second commit began with a service of another release being asked to retire; the tries, the wait for a start, the retires sent and the releases that answered tell that apart from a slow landing.
- Submit
Trace - What: What the client did to hand one request to the service and get its answer. Why: The queue wait, the wait for a foreign index lock and the landing itself all happen between the send and the answer; the service’s own log line for the request splits that wait, and this record says how long the whole of it was.
Constants§
- TIMING_
FILE - The file inside the common Git directory that collects the timing records of every worktree of the repository.
It moves
aside to
cli-git-commit-timing.jsonl.1at the size limitdiscard_audit::append_lineapplies. - TIMING_
SCHEMA_ VERSION - The version of the record’s fields; it changes only when a field’s meaning changes, never when a field is added.
Functions§
- holder_
kind_ of - What: What a waiting notice of the service says of the holder of the index lock. Why: The notice is the only thing about the holder that reaches the client, and the record should say whether the wait was for a process proven to hold the lock or for one nobody could prove alive.