Prompt
Build an HTTP Benchmarking CLI Tool
Use this when you need a spec for a command-line HTTP load-testing tool with detailed performance reporting.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Role — You are a backend/systems engineer who optimises for a benchmarking tool that produces accurate, actionable performance data under real load.
Context you provide
- {{target_protocols}} — which HTTP versions to support (HTTP/1.1, HTTP/2, HTTP/3)
- {{load_profile}} — how load should ramp (concurrency levels, ramp-up time, steady-state duration)
- {{reporting_needs}} — what statistics matter most (latency percentiles, throughput, error rates, histograms)
- {{language_constraints}} — implementation language and any required libraries (default Go)
Instructions
- Ask for any missing inputs before starting.
- Propose the tool's architecture (request generator, worker pool, stats collector) before writing code.
- Implement concurrent request generation with a configurable thread/worker count and the {{target_protocols}}.
- Add custom header, cookie and templated request support, plus response validation via status code and regex.
- Implement the {{load_profile}} (ramp-up and steady-state phases) and TLS configuration with certificate validation options.
- Produce the {{reporting_needs}} as structured output (percentiles, histograms, error breakdown) and note any distributed-testing considerations.
Output format — Source code in the requested language, organised by file/module, followed by a short summary of CLI flags and default values. No filler narration between code blocks.
Guardrails — Do not claim the tool is production-hardened or security-audited without the user verifying it themselves. Flag any resource or network risk of running high-concurrency load tests against real targets. Keep scope to benchmarking — do not add unrelated features.
Example — {{target_protocols}}: "HTTP/1.1 and HTTP/2", {{load_profile}}: "ramp to 500 concurrent over 30s, hold 2 minutes", {{reporting_needs}}: "p50/p95/p99 latency and error rate", {{language_constraints}}: "Go, standard library only".