I0837 — Timing report as JSON
Under --json, print the timing report as one JSON object on stderr with phases and counters, so bench can carry a phase breakdown per sample.
DONE wave 1 · p0 · implementation profile · runs alone
Part of M004 — Performance is executable evidence, and the hot path does no canonical work twice.
Objective
Under --json, print the timing report as one JSON object on stderr with phases and counters, so bench can carry a phase breakdown per sample.
Why
A breakdown that only humans can read cannot be compared by a check.
Current state
The report is text.
Desired state
Same data, one line of JSON when --json is set, documented in docs/SCHEMAS.md.
Scope
- lib/common.sh
- docs/SCHEMAS.md
- lib/bench.sh
Dependencies
Acceptance criteria
- The JSON parses with jq and carries every phase and counter of the text form
Validation
- MJ_TIMING=1 bin/majordomus --json doctor
Evidence required
- phase_timing
Evidence
| covers | type | command | result | at commit |
|---|---|---|---|---|
| phase_timing | test | bash test/run.sh 886_the_timing_report_is_json | ok at 4090b2b8ae: under --json the timing report is one line of JSON carrying every phase and counter of the text form; MJ_TIMING=1 bin/majordomus --json doctor printed it with 'phases' and 'total_ms'; the change is 3142d27627 (PR #745, landed in #815) | 4090b2b |
Risk
stdout stays the command's; the report stays on stderr in both forms.
Timeline
- started
- 2026-10-08T10:33:54Z
- verified
- 2026-10-08T10:34:25Z
- completed
- 2026-10-08T10:34:30Z
Those three fields, the evidence above and the state of the dependencies are all the status is made of. There is no status field to disagree with them.
Canonical record: .ai/repo/project/issues/I0837.yaml. Read it back with majordomus plan show I0837.