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

58 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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
```sh
cd go
go build -o latprobe .
```
## Usage
```sh
latprobe <url> [url ...]
```
## Examples
Single URL:
```sh
$ ./latprobe https://example.com
https://example.com 200 70ms
```
Multiple URLs:
```sh
$ ./latprobe https://example.com https://www.google.com
https://example.com 200 70ms
https://www.google.com 200 127ms
```
Error (unreachable host):
```sh
$ ./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.