@@ -33,14 +33,14 @@ def _run() -> None:
33
33
loop .run_until_complete (run_client_benchmark ())
34
34
35
35
36
- def test_one_hundred_get_requests_with_2048_chunked_payload (
36
+ def test_one_hundred_get_requests_with_1024_chunked_payload (
37
37
loop : asyncio .AbstractEventLoop ,
38
38
aiohttp_client : AiohttpClient ,
39
39
benchmark : BenchmarkFixture ,
40
40
) -> None :
41
- """Benchmark 100 GET requests with a small payload of 2048 bytes."""
41
+ """Benchmark 100 GET requests with a small payload of 1024 bytes."""
42
42
message_count = 100
43
- payload = b"a" * 2048
43
+ payload = b"a" * 1024
44
44
45
45
async def handler (request : web .Request ) -> web .Response :
46
46
resp = web .Response (body = payload )
@@ -62,14 +62,14 @@ def _run() -> None:
62
62
loop .run_until_complete (run_client_benchmark ())
63
63
64
64
65
- def test_one_hundred_get_requests_with_32768_chunked_payload (
65
+ def test_one_hundred_get_requests_with_30000_chunked_payload (
66
66
loop : asyncio .AbstractEventLoop ,
67
67
aiohttp_client : AiohttpClient ,
68
68
benchmark : BenchmarkFixture ,
69
69
) -> None :
70
- """Benchmark 100 GET requests with a payload of 32768 bytes."""
70
+ """Benchmark 100 GET requests with a payload of 30000 bytes."""
71
71
message_count = 100
72
- payload = b"a" * 32768
72
+ payload = b"a" * 30000
73
73
74
74
async def handler (request : web .Request ) -> web .Response :
75
75
resp = web .Response (body = payload )
@@ -91,14 +91,14 @@ def _run() -> None:
91
91
loop .run_until_complete (run_client_benchmark ())
92
92
93
93
94
- def test_one_hundred_get_requests_with_1mib_chunked_payload (
94
+ def test_one_hundred_get_requests_with_512kib_chunked_payload (
95
95
loop : asyncio .AbstractEventLoop ,
96
96
aiohttp_client : AiohttpClient ,
97
97
benchmark : BenchmarkFixture ,
98
98
) -> None :
99
- """Benchmark 100 GET requests with a payload of 1MiB bytes ."""
99
+ """Benchmark 100 GET requests with a payload of 512KiB ."""
100
100
message_count = 100
101
- payload = b"a" * 1024 ** 2
101
+ payload = b"a" * ( 2 ** 19 )
102
102
103
103
async def handler (request : web .Request ) -> web .Response :
104
104
resp = web .Response (body = payload )
@@ -120,14 +120,14 @@ def _run() -> None:
120
120
loop .run_until_complete (run_client_benchmark ())
121
121
122
122
123
- def test_one_hundred_get_requests_with_2048_content_length_payload (
123
+ def test_one_hundred_get_requests_with_1024_content_length_payload (
124
124
loop : asyncio .AbstractEventLoop ,
125
125
aiohttp_client : AiohttpClient ,
126
126
benchmark : BenchmarkFixture ,
127
127
) -> None :
128
- """Benchmark 100 GET requests with a small payload of 2048 bytes."""
128
+ """Benchmark 100 GET requests with a small payload of 1024 bytes."""
129
129
message_count = 100
130
- payload = b"a" * 2048
130
+ payload = b"a" * 1024
131
131
headers = {hdrs .CONTENT_LENGTH : str (len (payload ))}
132
132
133
133
async def handler (request : web .Request ) -> web .Response :
@@ -148,14 +148,14 @@ def _run() -> None:
148
148
loop .run_until_complete (run_client_benchmark ())
149
149
150
150
151
- def test_one_hundred_get_requests_with_32768_content_length_payload (
151
+ def test_one_hundred_get_requests_with_30000_content_length_payload (
152
152
loop : asyncio .AbstractEventLoop ,
153
153
aiohttp_client : AiohttpClient ,
154
154
benchmark : BenchmarkFixture ,
155
155
) -> None :
156
- """Benchmark 100 GET requests with a payload of 32768 bytes."""
156
+ """Benchmark 100 GET requests with a payload of 30000 bytes."""
157
157
message_count = 100
158
- payload = b"a" * 32768
158
+ payload = b"a" * 30000
159
159
headers = {hdrs .CONTENT_LENGTH : str (len (payload ))}
160
160
161
161
async def handler (request : web .Request ) -> web .Response :
@@ -176,14 +176,14 @@ def _run() -> None:
176
176
loop .run_until_complete (run_client_benchmark ())
177
177
178
178
179
- def test_one_hundred_get_requests_with_1mib_content_length_payload (
179
+ def test_one_hundred_get_requests_with_512kib_content_length_payload (
180
180
loop : asyncio .AbstractEventLoop ,
181
181
aiohttp_client : AiohttpClient ,
182
182
benchmark : BenchmarkFixture ,
183
183
) -> None :
184
- """Benchmark 100 GET requests with a payload of 1MiB bytes ."""
184
+ """Benchmark 100 GET requests with a payload of 512KiB ."""
185
185
message_count = 100
186
- payload = b"a" * 1024 ** 2
186
+ payload = b"a" * ( 2 ** 19 )
187
187
headers = {hdrs .CONTENT_LENGTH : str (len (payload ))}
188
188
189
189
async def handler (request : web .Request ) -> web .Response :
0 commit comments