| Crates.io | httpress |
| lib.rs | httpress |
| version | 0.5.0 |
| created_at | 2026-01-09 08:58:09.748196+00 |
| updated_at | 2026-01-12 16:59:14.91467+00 |
| description | A fast HTTP benchmarking tool built in Rust |
| homepage | |
| repository | https://github.com/TecuceanuGabriel/httpress |
| max_upload_size | |
| id | 2031813 |
| size | 108,663 |
A fast HTTP benchmarking tool built in Rust.
cargo install httpress
Or from source:
cargo install --path .
# 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
# Rate limiting
httpress http://example.com -r 1000 -d 10s
# POST with body and headers
httpress http://example.com/add -m post \
-H "Content-Type: application/json" \
-b '{"key": "value"}'
| Flag | Description | Default |
|---|---|---|
-n, --requests |
Total number of requests | - |
-d, --duration |
Test duration (e.g. 10s, 1m) | - |
-c, --concurrency |
Concurrent connections | 10 |
-r, --rate |
Rate limit (req/s) | - |
-m, --method |
HTTP method | GET |
-H, --header |
HTTP header (repeatable) | - |
-b, --body |
Request body | - |
-t, --timeout |
Request timeout in seconds | 30 |
-> 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
# 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
Add httpress as a dependency in your Cargo.toml:
[dependencies]
httpress = "0.5"
tokio = { version = "1", features = ["full"] }
See examples/basic_benchmark.rs for a basic example of using the api.
See examples/custom_requests.rs for an example of using the request_fn() method to generate custom requests.
See examples/rate_ramping.rs for an example of using the rate_fn() method to generate custom rates.
See examples/hooks_metrics.rs for an example of how to use hooks to generate custom metrics.