Skip to content

Benchmarks

httpr's performance is tracked three ways. All of them run in GitHub Actions.

Comparison with other clients

Every Monday, benchmark/benchmark.py runs httpr against the latest release of requests, httpx, httpx2, aiohttp, curl_cffi, pycurl and tls_client: 400 requests per cell against a local uvicorn server with gzip responses, in sync, async and multi-threaded modes. Wall-clock seconds, lower is better.

HTTP client comparison

The full tables and raw CSVs are published with the chart. Absolute numbers depend on the GitHub runner, so compare rows within a chart rather than charts across weeks.

httpr over time

On every push to main, tests/benchmark/test_performance.py runs under pytest-benchmark and the results are appended to the live trend chart. The runners are shared, so a single run can swing by 1.5x; look at the trend, not at individual points.

Timings per pull request

CodSpeed runs tests/benchmark/codspeed/ under its walltime instrument on every pull request and reports the difference against main on the PR. Walltime includes the socket I/O that dominates an HTTP client, which CPU simulation leaves out. It runs on a shared GitHub runner, so small differences can be noise.

Running locally

See benchmark/README.md.