HTTP Benchmarking Tool CLI
Contributed by f
Improved by Laravel Company · 2026-09-07
Improved prompt:
Design and implement a comprehensive, high-performance HTTP benchmarking tool in the Go programming language, targeting both local and distributed load testing scenarios. The primary objective is to create a robust, extensible, and customizable tool that enables developers and QA engineers to thoroughly evaluate the performance, reliability, and capacity of web applications and APIs under various load conditions.
Key requirements and features:
Concurrent Request Generation with Thread Count Control
- Implement a flexible thread pool mechanism with configurable thread counts to simulate multiple users or client connections simultaneously.
- Ensure efficient resource utilization and minimize context switching overhead.
Detailed Metrics and Statistics
- Calculate and report key performance indicators (KPIs) including:
- Latency: Average, minimum, maximum, median, and percentiles (90th, 95th, 99th) of request response times.
- Throughput: Requests per second (RPS) and bytes per second (BPS) for both incoming and outgoing data.
- Error Rates: Overall, by status code category (e.g., 2xx, 3xx, 4xx, 5xx), and by specific error types.
- Provide summary statistics for the entire test duration and for each phase (ramp-up, steady-state, ramp-down).
- Calculate and report key performance indicators (KPIs) including:
Protocol Support and Advanced Configuration
- Support for HTTP/1.1, HTTP/2, and HTTP/3 protocols with automatic protocol detection or manual selection.
- Custom header and cookie management: Allow users to define arbitrary headers and cookies for requests, and report received headers and cookies in responses.
- Request templating: Enable the creation of dynamic requests using placeholders, allowing for variable content and data-driven tests.
- Response validation: Implement regex matching for response bodies and status code validation to verify the expected behavior.
Security and TLS Configuration
- TLS/SSL support: Configure TLS certificates for communication, including self-signed, trusted CA, and client certificate authentication.
- Certificate validation options: Allow users to control certificate verification behavior, including ignoring certificate errors for development purposes while maintaining secure production configurations.
Load Profile Configuration and Distributed Testing
- Load profile configuration: Define ramp-up phases (number of threads over time), steady-state phases (constant load), and ramp-down phases to mimic real-world user behavior and test the system's ability to handle changing loads.
- Distributed testing: Implement a master-slave architecture to coordinate multiple benchmark instances across different machines or cloud instances, allowing for high-load testing of distributed systems and CDNs.
Comprehensive Reporting and Visualization
- Percentile analysis: Provide detailed insights into the tail latency behavior and identify outliers that may indicate network issues or service degradation.
- Histograms and charts: Generate visual representations of latency distributions, error rates over time, and other key metrics for easy interpretation of results.
Ensure the tool is designed with a clear, intuitive command-line interface, comprehensive documentation, and easy-to-understand output formats to streamline the testing process and enable effective performance optimization.
Original prompt (before our improvements)
Create a high-performance HTTP benchmarking tool in Go. Implement concurrent request generation with configurable thread count. Add detailed statistics including latency, throughput, and error rates. Include support for HTTP/1.1, HTTP/2, and HTTP/3. Implement custom header and cookie management. Add request templating for dynamic content. Include response validation with regex and status code checking. Implement TLS configuration with certificate validation options. Add load profile configuration with ramp-up and steady-state phases. Include detailed reporting with percentiles and histograms. Implement distributed testing mode for high-load scenarios.