-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add benchmarking script #923
Add benchmarking script #923
Conversation
1bbc3ce
to
e4d3bd9
Compare
Great thanks. Is there any sense in us also having the same benchmark for the threaded case? |
It might make sense for checking the pool optimization with the sync case |
d2d45c8
to
2954aeb
Compare
@tomchristie I added now here the sync benchmark using |
I think the most important part of performance improvement is writing effective benchmarks. So, I have two questions here:
|
2463317
to
1302d5a
Compare
1302d5a
to
86606a3
Compare
It doesnt actually work very well when running in a single process as then the benchmark also includes the server side. The sync benchmark especially breaks as the async server wont be able to process the requests as the sync IO is blocking everything. So it would need also to use some threaded sync server which starts to get complex to my taste just for the benchmarking.
Good point, I think it makes sense to use |
Okay, yes. |
Summary
Adds benchmarking script comparing
httpcore
against another popular http libraryaiohttp
. Related to performance issueshttpcore
has encode/httpx#3215.This runs 500 requests with 20 requests concurrently. The test is repeated 10 times. Test server has simulated latency of 10ms with 2KB response. Simulating a good network connection (eg in data center conditions).
Checklist