Files
http-latency-prober/docs/usage/step-1-total-latency.md
Jan Novak a588eb3b0e feat(go): step 1 — total wall-clock latency per URL
probe.Measure performs an HTTP GET and records total elapsed time from
request start to body fully read. main.go prints URL, status code, and
total for each positional URL argument, exiting 1 on any failure.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 00:21:12 +02:00

1.1 KiB
Raw Blame History

Step 1 — Simple Total Latency

What this step delivers

latprobe accepts one or more URLs and prints the total wall-clock time of each HTTP GET request (including body download). No per-phase breakdown yet — that comes in Step 2.

Build

cd go
go build -o latprobe .

Usage

latprobe <url> [url ...]

Examples

Single URL:

$ ./latprobe https://example.com
https://example.com                            200  70ms

Multiple URLs:

$ ./latprobe https://example.com https://www.google.com
https://example.com                            200  70ms
https://www.google.com                         200  127ms

Error (unreachable host):

$ ./latprobe https://doesnotexist.invalid
error https://doesnotexist.invalid: Get "https://doesnotexist.invalid": ...
# exits with code 1

Output columns

Column Description
URL The requested URL
Status HTTP response status code
Total Wall-clock time from request start to body fully received

Flags accepted (not yet functional)

-n/--count and --json are parsed but produce no effect until Steps 34.