Files
http-latency-prober/docs/usage/step-0-scaffold.md
Jan Novak 5717f018b7 chore: initial scaffold for latprobe CLI tool
Sets up project structure, working conventions (CLAUDE.md), README with
the full assignment and roadmap, seeded CHANGELOG, and a buildable Go
scaffold (Step 0) with flag parsing and stub probe types.

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

52 lines
1.2 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 0 — Scaffold
## What this step delivers
A buildable Go binary (`latprobe`) that parses flags and URLs, prints usage
when invoked without arguments, and exits cleanly. No measurement logic yet —
the full implementation is wired in during Steps 14.
## Build
```sh
cd go
go build -o latprobe .
```
## Usage
```sh
# No arguments → prints usage and exits with code 1
./latprobe
# With a URL → scaffold message until Step 1 is implemented
./latprobe https://example.com
```
Expected output (scaffold stage):
```
latprobe — measure per-phase HTTP request latency
Usage:
latprobe [flags] <url> [url ...]
Flags:
-n, --count int Number of requests per URL (default 1)
--json Output results as JSON instead of text
-h, --help Show this help
Examples:
latprobe https://example.com
latprobe -n 5 https://example.com https://www.google.com
latprobe --json https://example.com | jq .
```
## Available flags (accepted by the parser, not yet functional)
| Flag | Short | Default | Description |
|------|-------|---------|-------------|
| `--count` | `-n` | `1` | Number of requests per URL |
| `--json` | — | false | Output as JSON instead of text |
| `--help` | `-h` | — | Show usage |