httpress 0.1.0

A fast HTTP benchmarking tool built in Rust
Documentation

httpress

A fast HTTP benchmarking tool built in Rust.

Installation

cargo install httpress

Or from source:

cargo install --path .

Usage

# Basic benchmark (10 concurrent connections, infinite loop)
httpress http://example.com

# Fixed number of requests
httpress http://example.com -n 1000 -c 50

# Fixed total duration
httpress http://example.com -d 30s -c 100

# POST with body and headers
httpress http://example.com/add -m post \
  -H "Content-Type: application/json" \
  -b '{"key": "value"}'

Options

Flag Description Default
-n, --requests Total number of requests -
-d, --duration Test duration (e.g. 10s, 1m) -
-c, --concurrency Concurrent connections 10
-m, --method HTTP method GET
-H, --header HTTP header (repeatable) -
-b, --body Request body -
-t, --timeout Request timeout in seconds 30

Example Output

-> httpress http://127.0.0.1:3000 -n 1000 -c 10

Target: http://127.0.0.1:3000 Get
Concurrency: 10
Stop condition: Requests(1000)

Starting benchmark with 10 workers...

--- Benchmark Complete ---
Requests:     1000 total, 1000 success, 0 errors
Duration:     0.06s
Throughput:   16185.07 req/s

Latency:
  Min:    245us
  Max:    2.41ms
  Mean:   612us
  p50:    544us
  p90:    955us
  p95:    1.08ms
  p99:    1.61ms

Status codes:
  200: 1000

Development

# Run the test server
cargo run --example test_server

# In another terminal, run benchmarks
cargo run -- http://127.0.0.1:3000 -n 100 -c 10