Skip to content
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

[PR #10426/fae142f5 backport][3.11] Add benchmark for streaming API iter_chunks #10427

Conversation

patchback[bot]
Copy link
Contributor

@patchback patchback bot commented Feb 6, 2025

This is a backport of PR #10426 as merged into master (fae142f).

Benchmark to demo the benefit of iter_chunks over read

Most of the time is spent in getting the data from llhttp into python objects
Screenshot 2025-02-06 at 10 02 30 AM

@bdraco bdraco enabled auto-merge (squash) February 6, 2025 16:08
Copy link

codecov bot commented Feb 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.08%. Comparing base (1bd7faa) to head (2e70676).
Report is 1 commits behind head on 3.11.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             3.11   #10427   +/-   ##
=======================================
  Coverage   98.08%   98.08%           
=======================================
  Files         123      123           
  Lines       37305    37324   +19     
  Branches     4498     4501    +3     
=======================================
+ Hits        36589    36608   +19     
  Misses        538      538           
  Partials      178      178           
Flag Coverage Δ
CI-GHA 97.97% <100.00%> (+<0.01%) ⬆️
OS-Linux 97.67% <100.00%> (-0.01%) ⬇️
OS-Windows 94.72% <100.00%> (+0.01%) ⬆️
OS-macOS 96.80% <100.00%> (+<0.01%) ⬆️
Py-3.10.11 96.65% <100.00%> (+<0.01%) ⬆️
Py-3.10.16 97.18% <100.00%> (-0.05%) ⬇️
Py-3.11.11 97.25% <100.00%> (+<0.01%) ⬆️
Py-3.11.9 96.74% <100.00%> (+0.02%) ⬆️
Py-3.12.8 97.73% <100.00%> (-0.01%) ⬇️
Py-3.13.1 97.72% <100.00%> (+<0.01%) ⬆️
Py-3.9.13 96.58% <94.73%> (-0.01%) ⬇️
Py-3.9.21 97.14% <94.73%> (+0.03%) ⬆️
Py-pypy7.3.16 96.72% <100.00%> (+<0.01%) ⬆️
VM-macos 96.80% <100.00%> (+<0.01%) ⬆️
VM-ubuntu 97.67% <100.00%> (-0.01%) ⬇️
VM-windows 94.72% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

codspeed-hq bot commented Feb 6, 2025

CodSpeed Performance Report

Merging #10427 will degrade performances by 15.86%

Comparing patchback/backports/3.11/fae142f59841d64eb57bed189397f9baca0c44a6/pr-10426 (2e70676) with 3.11 (1bd7faa)

Summary

❌ 13 (👁 13) regressions
✅ 34 untouched benchmarks
🆕 1 new benchmarks

Benchmarks breakdown

Benchmark BASE HEAD Change
🆕 test_one_hundred_get_requests_iter_chunks_on_512kib_chunked_payload[pyloop] N/A 108.4 ms N/A
👁 test_resolve_dynamic_resource_url_with_many_dynamic_routes[pyloop] 3.5 ms 3.9 ms -9.92%
👁 test_resolve_dynamic_resource_url_with_many_dynamic_routes_with_common_prefix[pyloop] 246 ms 292.4 ms -15.86%
👁 test_resolve_dynamic_resource_url_with_many_static_routes[pyloop] 3.6 ms 3.9 ms -9.55%
👁 test_resolve_gitapi[pyloop] 292.7 ms 337.4 ms -13.23%
👁 test_resolve_gitapi_root[pyloop] 2 ms 2.4 ms -15.22%
👁 test_resolve_gitapi_subapps[pyloop] 294.4 ms 339 ms -13.16%
👁 test_resolve_multiple_fixed_url_with_many_routes[pyloop] 2.2 ms 2.6 ms -14.42%
👁 test_resolve_multiple_level_fixed_url_with_many_routes[pyloop] 8.5 ms 10 ms -14.85%
👁 test_resolve_prefix_resources_many_prefix_many_plain[pyloop] 4.9 ms 5.4 ms -10.34%
👁 test_resolve_root_route[pyloop] 879 µs 1,032 µs -14.82%
👁 test_resolve_root_route_with_many_fixed_routes[pyloop] 887.3 µs 1,031.9 µs -14.01%
👁 test_resolve_single_fixed_url_with_many_routes[pyloop] 888.3 µs 1,036.8 µs -14.32%
👁 test_resolve_static_root_route[pyloop] 969.9 µs 1,127.7 µs -14%

@bdraco bdraco merged commit c4523f3 into 3.11 Feb 6, 2025
35 checks passed
@bdraco bdraco deleted the patchback/backports/3.11/fae142f59841d64eb57bed189397f9baca0c44a6/pr-10426 branch February 6, 2025 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant