Skip to content

Commit 9efa58a

Browse files
committed
feat: benchmark on mac
1 parent ce5cdef commit 9efa58a

File tree

11 files changed

+4202
-0
lines changed

11 files changed

+4202
-0
lines changed

benchmarks/results/darwin/0.2.4/benchmark.json

Lines changed: 4069 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
# httpmorph Benchmark Results
2+
3+
**Version:** 0.2.4 | **Generated:** 2025-11-07
4+
5+
## System Information
6+
7+
| Property | Value |
8+
|----------|-------|
9+
| **OS** | Darwin (macOS-15.6-arm64-arm-64bit) |
10+
| **Processor** | arm |
11+
| **CPU Cores** | 10 |
12+
| **Memory** | 16.0 GB |
13+
| **Python** | 3.11.5 (CPython) |
14+
15+
## Test Configuration
16+
17+
- **Sequential Requests:** 25 (warmup: 5)
18+
- **Concurrent Requests:** 25 (workers: 5)
19+
20+
## Library Versions
21+
22+
| Library | Version | Status |
23+
|---------|---------|--------|
24+
| **httpmorph** | `0.2.4` | Installed |
25+
| **requests** | `2.31.0` | Installed |
26+
| **httpx** | `0.27.2` | Installed |
27+
| **aiohttp** | `3.8.5` | Installed |
28+
| **urllib3** | `1.26.16` | Installed |
29+
| **urllib** | `built-in (Python 3.11.5)` | Installed |
30+
| **pycurl** | `PycURL/7.45.2 libcurl/8.7.1 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.12 nghttp2/1.64.0` | Installed |
31+
| **curl_cffi** | `0.13.0` | Installed |
32+
33+
## Sequential Tests (Lower is Better)
34+
35+
Mean response time in milliseconds
36+
37+
| Library | Local HTTP | Proxy HTTP | Proxy HTTP2 | Proxy HTTPs | Remote HTTP | Remote HTTP2 | Remote HTTPs |
38+
|---------|--------:|--------:|--------:|--------:|--------:|--------:|--------:|
39+
| **curl_cffi** | 0.43ms | ERROR | ERROR | 1576.17ms | 65.70ms | 101.59ms | 94.96ms |
40+
| **httpmorph** | 0.31ms | 891.02ms | 1620.74ms | 1679.02ms | 62.20ms | 98.39ms | 97.47ms |
41+
| **httpx** | 1.14ms | 596.42ms | 338.85ms | 367.00ms | 66.42ms | 96.58ms | 102.12ms |
42+
| **pycurl** | 0.43ms | 1347.29ms | 1700.27ms | ERROR | 62.17ms | 103.57ms | 100.06ms |
43+
| **requests** | 0.94ms | 349.35ms | N/A | 338.11ms | 31.50ms | N/A | 26.71ms |
44+
| **urllib** | 15.83ms | 1094.31ms | N/A | 1785.94ms | 65.10ms | N/A | 120.19ms |
45+
| **urllib3** | 0.36ms | 397.95ms | N/A | 387.72ms | 30.93ms | N/A | 36.31ms |
46+
47+
**Winners (Sequential):**
48+
- Local HTTP: **httpmorph** (0.31ms)
49+
- Proxy HTTP: **requests** (349.35ms)
50+
- Proxy HTTP2: **httpx** (338.85ms)
51+
- Proxy HTTPs: **requests** (338.11ms)
52+
- Remote HTTP: **urllib3** (30.93ms)
53+
- Remote HTTP2: **httpx** (96.58ms)
54+
- Remote HTTPs: **requests** (26.71ms)
55+
56+
## Concurrent Tests (Higher is Better)
57+
58+
Throughput in requests per second
59+
60+
| Library | Local HTTP | Proxy HTTP | Proxy HTTP2 | Proxy HTTPs | Remote HTTP | Remote HTTP2 | Remote HTTPs |
61+
|---------|--------:|--------:|--------:|--------:|--------:|--------:|--------:|
62+
| **curl_cffi** | 1645.08 | 2.31 | 2.73 | ERROR | 68.06 | 46.08 | 48.57 |
63+
| **httpmorph** | 6769.95 | 5.43 | 3.24 | 2.31 | 76.03 | 50.09 | 51.35 |
64+
| **httpx** | 803.58 | 10.68 | ERROR | 3.84 | 75.23 | 49.41 | 48.82 |
65+
| **pycurl** | 2757.38 | 2.35 | 2.58 | 2.39 | 70.46 | 46.50 | 36.88 |
66+
| **requests** | 1040.44 | 10.51 | N/A | 6.45 | 126.58 | N/A | 57.34 |
67+
| **urllib** | 25.74 | 2.73 | N/A | 2.25 | 72.05 | N/A | 28.49 |
68+
| **urllib3** | 1422.15 | 5.35 | N/A | 7.94 | 103.52 | N/A | 57.53 |
69+
70+
**Winners (Concurrent):**
71+
- Local HTTP: **httpmorph** (6769.95 req/s)
72+
- Proxy HTTP: **httpx** (10.68 req/s)
73+
- Proxy HTTP2: **httpmorph** (3.24 req/s)
74+
- Proxy HTTPs: **urllib3** (7.94 req/s)
75+
- Remote HTTP: **requests** (126.58 req/s)
76+
- Remote HTTP2: **httpmorph** (50.09 req/s)
77+
- Remote HTTPs: **urllib3** (57.53 req/s)
78+
79+
## Async Tests (Higher is Better)
80+
81+
Throughput in requests per second
82+
83+
| Library | Local HTTP | Proxy HTTP | Proxy HTTP2 | Proxy HTTPs | Remote HTTP | Remote HTTP2 | Remote HTTPs |
84+
|---------|--------:|--------:|--------:|--------:|--------:|--------:|--------:|
85+
| **aiohttp** | 165.03 | 4.39 | N/A | 10.76 | 254.00 | N/A | 115.49 |
86+
| **httpmorph** | 193.16 | 66.86 | 3.78 | 3.79 | 241.08 | 170.36 | 165.16 |
87+
| **httpx** | 158.09 | 4.29 | 4.01 | 3.99 | 221.29 | 137.07 | 165.55 |
88+
89+
**Winners (Async):**
90+
- Local HTTP: **httpmorph** (193.16 req/s)
91+
- Proxy HTTP: **httpmorph** (66.86 req/s)
92+
- Proxy HTTP2: **httpx** (4.01 req/s)
93+
- Proxy HTTPs: **aiohttp** (10.76 req/s)
94+
- Remote HTTP: **aiohttp** (254.00 req/s)
95+
- Remote HTTP2: **httpmorph** (170.36 req/s)
96+
- Remote HTTPs: **httpx** (165.55 req/s)
97+
98+
## Overall Performance Summary
99+
100+
### Sequential Tests: httpmorph vs requests Speedup
101+
102+
| Test | httpmorph | requests | Speedup |
103+
|------|----------:|---------:|--------:|
104+
| Local HTTP | 0.31ms | 0.94ms | **3.01x** faster |
105+
| Proxy HTTP | 891.02ms | 349.35ms | 0.39x slower |
106+
| Proxy HTTPs | 1679.02ms | 338.11ms | 0.20x slower |
107+
| Remote HTTP | 62.20ms | 31.50ms | 0.51x slower |
108+
| Remote HTTPs | 97.47ms | 26.71ms | 0.27x slower |
109+
110+
### Concurrent Tests: httpmorph vs requests Speedup
111+
112+
| Test | httpmorph | requests | Speedup |
113+
|------|----------:|---------:|--------:|
114+
| Local HTTP | 6769.95 req/s | 1040.44 req/s | **6.51x** faster |
115+
| Proxy HTTP | 5.43 req/s | 10.51 req/s | 0.52x slower |
116+
| Proxy HTTPs | 2.31 req/s | 6.45 req/s | 0.36x slower |
117+
| Remote HTTP | 76.03 req/s | 126.58 req/s | 0.60x slower |
118+
| Remote HTTPs | 51.35 req/s | 57.34 req/s | 0.90x slower |
119+
120+
### Async Tests: httpmorph vs httpx Speedup
121+
122+
| Test | httpmorph | httpx | Speedup |
123+
|------|----------:|------:|--------:|
124+
| Local HTTP | 193.16 req/s | 158.09 req/s | **1.22x** faster |
125+
| Proxy HTTP | 66.86 req/s | 4.29 req/s | **15.60x** faster |
126+
| Proxy HTTP2 | 3.78 req/s | 4.01 req/s | 0.94x slower |
127+
| Proxy HTTPs | 3.79 req/s | 3.99 req/s | 0.95x slower |
128+
| Remote HTTP | 241.08 req/s | 221.29 req/s | **1.09x** faster |
129+
| Remote HTTP2 | 170.36 req/s | 137.07 req/s | **1.24x** faster |
130+
| Remote HTTPs | 165.16 req/s | 165.55 req/s | 1.00x slower |
131+
132+
---
133+
*Generated by httpmorph benchmark suite*
78.4 KB
Loading
74.9 KB
Loading
58 KB
Loading
52.4 KB
Loading
78.1 KB
Loading
77.5 KB
Loading
85.2 KB
Loading
126 KB
Loading

0 commit comments

Comments
 (0)