要求用 Go 编写 HTTP 压测工具:并发请求、延迟与吞吐统计、支持 HTTP/1.1 至 HTTP/3 与响应校验。
使用 Go 语言创建一个高性能 HTTP 基准测试工具。实现支持可配置线程数的并发请求生成。添加详细统计信息,包括延迟、吞吐量和错误率。支持 HTTP/1.1、HTTP/2 和 HTTP/3。实现自定义请求头与 Cookie 管理。添加请求模板功能以支持动态内容。包含响应验证功能,支持正则表达式匹配与状态码检查。实现 TLS 配置,并提供证书验证选项。添加负载配置文件功能,支持预热(ramp-up)阶段与稳态(steady-state)阶段。包含详细报告功能,输出百分位数与直方图。实现分布式测试模式,以应对高负载场景。
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.