Skip to content

Latest commit

 

History

History
53 lines (35 loc) · 1.14 KB

File metadata and controls

53 lines (35 loc) · 1.14 KB

httpstat

Visualize curl statistics in the terminal. See DNS lookup, TCP connection, TLS handshake, and transfer times at a glance.

Install

pip install httpstat

Or just copy the single file:

curl -o httpstat.py https://raw.githubusercontent.com/himalaya0x/httpstat/master/httpstat.py
python3 httpstat.py https://example.com

Usage

httpstat https://example.com

# With custom headers
httpstat https://api.example.com -H "Authorization: Bearer token"

# POST request
httpstat https://api.example.com -X POST -d '{"key": "value"}'

# Follow redirects
httpstat -L https://example.com

Output

Connected to 93.184.216.34:443

  DNS Lookup   TCP Connection   TLS Handshake   Server Processing   Transfer
  |  12ms  |   |    28ms    |   |    45ms    |   |     135ms     |  |  2ms  |
  |         |-- 40ms -------|-- 85ms ---------|-- 220ms ----------|
  |         |                                                     |-- 222ms -|

  Status: 200 OK
  Body: 1256 bytes

How it works

Wraps curl with the -w (write-out) flag to extract timing data, then renders it as a waterfall diagram.

License

MIT