Skip to content

Parameterize test_simple_web_file_response benchmarks by file size#12913

Merged
Dreamsorcerer merged 12 commits into
aio-libs:masterfrom
tarasko:feature/parameterize_fileresponse_bench
Jun 13, 2026
Merged

Parameterize test_simple_web_file_response benchmarks by file size#12913
Dreamsorcerer merged 12 commits into
aio-libs:masterfrom
tarasko:feature/parameterize_fileresponse_bench

Conversation

@tarasko

@tarasko tarasko commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

What do these changes do?

Parameterize test_simple_web_file_response and test_simple_web_file_response_fallback by small (10 kb) and large (1 MB) file sizes. This establishes a baseline and let us see how much enabling KTLS impacts performance depending on the file size in the aiofastnet PR

Are there changes in behavior for the user?

No

Is it a substantial burden for the maintainers to support this?

No

Related issue number

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • Add a new news fragment into the CHANGES/ folder

@tarasko tarasko requested a review from asvetlov as a code owner June 12, 2026 16:16
@tarasko tarasko requested a review from webknjaz as a code owner June 12, 2026 16:19
@psf-chronographer psf-chronographer Bot added the bot:chronographer:provided There is a change note present in this PR label Jun 12, 2026
@codecov

codecov Bot commented Jun 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.95%. Comparing base (12ea5a5) to head (5c7e460).
⚠️ Report is 4 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #12913   +/-   ##
=======================================
  Coverage   98.95%   98.95%           
=======================================
  Files         131      131           
  Lines       47824    47834   +10     
  Branches     2480     2480           
=======================================
+ Hits        47324    47334   +10     
  Misses        376      376           
  Partials      124      124           
Flag Coverage Δ
Autobahn 22.29% <27.77%> (+<0.01%) ⬆️
CI-GHA 98.92% <100.00%> (+<0.01%) ⬆️
OS-Linux 98.68% <100.00%> (+<0.01%) ⬆️
OS-Windows 97.05% <100.00%> (+<0.01%) ⬆️
OS-macOS 97.95% <100.00%> (+<0.01%) ⬆️
Py-3.10 98.17% <100.00%> (+<0.01%) ⬆️
Py-3.11 98.42% <100.00%> (+<0.01%) ⬆️
Py-3.12 98.52% <100.00%> (+<0.01%) ⬆️
Py-3.13 98.48% <100.00%> (-0.01%) ⬇️
Py-3.14 98.51% <100.00%> (+<0.01%) ⬆️
Py-3.14t 97.59% <100.00%> (+<0.01%) ⬆️
Py-pypy-3.11 97.45% <100.00%> (-0.01%) ⬇️
VM-macos 97.95% <100.00%> (+<0.01%) ⬆️
VM-ubuntu 98.68% <100.00%> (+<0.01%) ⬆️
VM-windows 97.05% <100.00%> (+<0.01%) ⬆️
cython-coverage 38.07% <0.00%> (-0.01%) ⬇️

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

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

@codspeed-hq

codspeed-hq Bot commented Jun 12, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 75 untouched benchmarks
🆕 8 new benchmarks
⏩ 83 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
🆕 test_simple_web_file_response[ssl-large] N/A 242.1 ms N/A
🆕 test_simple_web_file_response[ssl-small] N/A 117.1 ms N/A
🆕 test_simple_web_file_response[tcp-large] N/A 35.8 ms N/A
🆕 test_simple_web_file_response[tcp-small] N/A 84.8 ms N/A
🆕 test_simple_web_file_sendfile_fallback_response[ssl-large] N/A 242.4 ms N/A
🆕 test_simple_web_file_sendfile_fallback_response[ssl-small] N/A 117.1 ms N/A
🆕 test_simple_web_file_sendfile_fallback_response[tcp-large] N/A 127.6 ms N/A
🆕 test_simple_web_file_sendfile_fallback_response[tcp-small] N/A 93.6 ms N/A

Comparing tarasko:feature/parameterize_fileresponse_bench (5c7e460) with master (12ea5a5)2

Open in CodSpeed

Footnotes

  1. 83 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on master (c83240f) during the generation of this report, so 12ea5a5 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@Dreamsorcerer Dreamsorcerer added the backport-3.15 Trigger automatic backporting to the 3.15 release branch by Patchback robot label Jun 13, 2026
@Dreamsorcerer Dreamsorcerer merged commit c2f4ac4 into aio-libs:master Jun 13, 2026
50 of 51 checks passed
@patchback

patchback Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Backport to 3.15: 💔 cherry-picking failed — conflicts found

❌ Failed to cleanly apply c2f4ac4 on top of patchback/backports/3.15/c2f4ac4037753c4762dbf5e4e77a09adcd6932d7/pr-12913

Backporting merged PR #12913 into master

  1. Ensure you have a local repo clone of your fork. Unless you cloned it
    from the upstream, this would be your origin remote.
  2. Make sure you have an upstream repo added as a remote too. In these
    instructions you'll refer to it by the name upstream. If you don't
    have it, here's how you can add it:
    $ git remote add upstream https://github.com/aio-libs/aiohttp.git
  3. Ensure you have the latest copy of upstream and prepare a branch
    that will hold the backported code:
    $ git fetch upstream
    $ git checkout -b patchback/backports/3.15/c2f4ac4037753c4762dbf5e4e77a09adcd6932d7/pr-12913 upstream/3.15
  4. Now, cherry-pick PR Parameterize test_simple_web_file_response benchmarks by file size #12913 contents into that branch:
    $ git cherry-pick -x c2f4ac4037753c4762dbf5e4e77a09adcd6932d7
    If it'll yell at you with something like fatal: Commit c2f4ac4037753c4762dbf5e4e77a09adcd6932d7 is a merge but no -m option was given., add -m 1 as follows instead:
    $ git cherry-pick -m1 -x c2f4ac4037753c4762dbf5e4e77a09adcd6932d7
  5. At this point, you'll probably encounter some merge conflicts. You must
    resolve them in to preserve the patch from PR Parameterize test_simple_web_file_response benchmarks by file size #12913 as close to the
    original as possible.
  6. Push this branch to your fork on GitHub:
    $ git push origin patchback/backports/3.15/c2f4ac4037753c4762dbf5e4e77a09adcd6932d7/pr-12913
  7. Create a PR, ensure that the CI is green. If it's not — update it so that
    the tests and any other checks pass. This is it!
    Now relax and wait for the maintainers to process your pull request
    when they have some cycles to do reviews. Don't worry — they'll tell you if
    any improvements are necessary when the time comes!

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@tarasko

tarasko commented Jun 13, 2026

Copy link
Copy Markdown
Contributor Author

I'll do a backport to 3.15

@tarasko

tarasko commented Jun 13, 2026

Copy link
Copy Markdown
Contributor Author

Backport to 3.15: #12926

Dreamsorcerer pushed a commit that referenced this pull request Jun 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-3.15 Trigger automatic backporting to the 3.15 release branch by Patchback robot bot:chronographer:provided There is a change note present in this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants