Python script that visualizes curl statistics with timing breakdown of DNS, TCP, TLS, and transfer phases
httpstat is a Python wrapper around curl that visualizes HTTP request performance metrics with detailed timing breakdowns. It displays the duration of each phase including DNS lookup, TCP connection, TLS handshake, server processing, and content transfer in a color-coded terminal output.
The tool provides both human-readable terminal output and structured JSON/JSONL formats for machine consumption. It supports SLO threshold checking that exits with code 4 when response times exceed specified limits for metrics like total time, connection time, or time-to-first-byte. Results can be saved to files for integration into monitoring workflows.
As a single-file Python script with no external dependencies beyond curl, httpstat accepts all standard curl options and can be used as a drop-in replacement for basic HTTP testing. It includes features like NO_COLOR support, configurable output through environment variables, and an optional agent skill for AI-assisted HTTP performance diagnostics. The tool is primarily useful for developers and operations teams debugging API latency issues or monitoring HTTP service performance.
# via Homebrew
brew install httpstat
# via pip
pip install httpstat
# via Direct download
wget https://raw.githubusercontent.com/reorx/httpstat/master/httpstat.py
