feat(cli): summarize the server trace file from the command line (#13698)

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
Theo BrowneandClaude Opus 5.5 authored and GitHub committed 2026-09-25 19:28:54 -07:00
1 parent 8aa5be2f02
commit 75bf92e652
6 files changed
+361 -6

No files matched your search

+15
View File
@@ -62,6 +62,21 @@ far in the future for the environment server's allowed window. It can point to
a date or time problem on either device, but it can also result from a delayed
request.
#### Summarize the trace file
`t3 trace summary` reads the trace file and its rotated backups directly, so it works while the
server is stalled or stopped. It prints counts, rates, and latency percentiles per span name. Use
it to measure background work or to compare two builds.
```bash
t3 trace summary --since 30m --limit 40
```
It reads `T3CODE_TRACE_FILE` if set, else `<home>/userdata/logs/server.trace.ndjson` for
`--base-dir` or `T3CODE_HOME`, plus the `T3CODE_TRACE_MAX_FILES` rotated backups. For a dev run or
a copied file, set `T3CODE_TRACE_FILE`. `--since 30m` keeps spans that ended in the last 30
minutes. The rate is per minute between the first and last span end.
### Metrics
Metrics are not written to a local file.