$ show six-ddc/plow
Plow is a high-performance HTTP(S) benchmarking CLI tool written in Go. It uses fasthttp for efficient HTTP client operations and provides real-time metrics including latency statistics, percentiles, histograms, and throughput. The tool supports configurable concurrency, request rate limiting, ramp-up, duration-based or request-count-based runs, and custom headers, body, TLS, and proxy settings. It outputs results to the terminal with live updating tables and also serves a web UI with interactive charts (latency, RPS, status codes, concurrency) using go-echarts. The architecture is a single binary with three main components: a requester that spawns concurrent workers, a stream-based report aggregator that computes streaming quantiles and histograms, and a printer/chart server for output. The code is well-structured, thoroughly tested, and follows Go best practices. It is not a library but a standalone application, though some internal components (e.g., the streaming stats engine and throughput interceptor) are cleanly isolated and could be reused in other projects.
The LLM identified 2 files worth highlighting for reuse:
Provides real-time statistical aggregation using streaming quantile and histogram algorithms from beorn7/perks. The Stats struct efficiently tracks min, max, mean, stddev. StreamReport collects latency records via channel and produces snapshots with percentiles and histograms. This component is isolated and could be reused in any benchmarking or monitoring tool requiring low-memory online statistics.
The ThroughputInterceptorDial function wraps a fasthttp.DialFunc to intercept Read/Write calls on net.Conn, atomically counting bytes transferred. This pattern is reusable for any Go application that needs to measure network throughput without modifying the application logic.