feat(go): step 4 — --json output flag

Add --json flag that emits all results as a JSON array. Schema always
uses min/avg/max per phase (consistent regardless of -n); phases absent
from the request are omitted from the phases object. Output is buffered
until all URLs complete, then printed as one pretty-printed array.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-07-01 00:31:54 +02:00
parent 8ec926bbcd
commit 3affc05996
4 changed files with 227 additions and 46 deletions

View File

@@ -4,6 +4,16 @@ All completed features are logged here in reverse-chronological order.
---
## 2026-07-01 00:08 — JSON output flag (Go, Step 4)
- `--json` flag emits a JSON array with one entry per URL
- Schema always uses min/avg/max shape (consistent regardless of `-n`)
- Phases absent from the request (e.g. TLS on HTTP) are omitted from the JSON object
- Failed URLs are excluded from JSON output and reported to stderr
- Text output unchanged and remains the default
---
## 2026-07-01 00:08 — Multiple URLs + sampling (Go, Step 3)
- `-n`/`--count` flag repeats each URL N times and reports min/avg/max per phase