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

Add benchmark for routing sub_applications #9935

Merged
merged 1 commit into from
Nov 17, 2024
Merged

Conversation

asvetlov
Copy link
Member

@asvetlov asvetlov commented Nov 17, 2024

Router should be optimized for handling 2 kind of prefix resources (sub_apps and static files are handled equally now):

  1. sub_apps are placed under non-overlapped top-level single-segment prefixed. test_resolve_gitapi_subapps benchmark test this case already.
  2. sub_apps shares the same prefix segments, e.g. /api/manager/plugin/{name}.

This PR covers the second case.

@asvetlov asvetlov added bot:chronographer:skip This PR does not need to include a change note backport-3.10 backport-3.11 Trigger automatic backporting to the 3.11 release branch by Patchback robot backport-3.12 Trigger automatic backporting to the 3.12 release branch by Patchback robot labels Nov 17, 2024
Copy link

codecov bot commented Nov 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.72%. Comparing base (73691e4) to head (da3e275).
Report is 1 commits behind head on master.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #9935   +/-   ##
=======================================
  Coverage   98.72%   98.72%           
=======================================
  Files         120      120           
  Lines       36570    36588   +18     
  Branches     4361     4366    +5     
=======================================
+ Hits        36102    36120   +18     
  Misses        315      315           
  Partials      153      153           
Flag Coverage Δ
CI-GHA 98.61% <100.00%> (+<0.01%) ⬆️
OS-Linux 98.29% <100.00%> (+<0.01%) ⬆️
OS-Windows 96.11% <100.00%> (+<0.01%) ⬆️
OS-macOS 97.38% <100.00%> (+<0.01%) ⬆️
Py-3.10.11 97.23% <100.00%> (+<0.01%) ⬆️
Py-3.10.15 97.84% <100.00%> (+<0.01%) ⬆️
Py-3.11.10 97.82% <100.00%> (-0.02%) ⬇️
Py-3.11.9 97.28% <100.00%> (-0.01%) ⬇️
Py-3.12.7 98.31% <100.00%> (-0.05%) ⬇️
Py-3.13.0 98.30% <100.00%> (-0.06%) ⬇️
Py-3.9.13 97.16% <100.00%> (+<0.01%) ⬆️
Py-3.9.20 97.75% <100.00%> (+<0.01%) ⬆️
Py-pypy7.3.16 97.31% <100.00%> (-0.01%) ⬇️
VM-macos 97.38% <100.00%> (+<0.01%) ⬆️
VM-ubuntu 98.29% <100.00%> (+<0.01%) ⬆️
VM-windows 96.11% <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 Nov 17, 2024

CodSpeed Performance Report

Merging #9935 will not alter performance

Comparing route-benchmarks-subapps (da3e275) with master (73691e4)

Summary

✅ 36 untouched benchmarks

🆕 1 new benchmarks

Benchmarks breakdown

Benchmark master route-benchmarks-subapps Change
🆕 test_resolve_prefix_resources_many_prefix_many_plain[pyloop] N/A 4.9 ms N/A

@asvetlov asvetlov merged commit 0c31249 into master Nov 17, 2024
43 of 45 checks passed
@asvetlov asvetlov deleted the route-benchmarks-subapps branch November 17, 2024 07:42
Copy link
Contributor

patchback bot commented Nov 17, 2024

Backport to 3.10: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.10/0c312496c6490f934cec360f21ae802e2c8d8679/pr-9935

Backported as #9936

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

patchback bot pushed a commit that referenced this pull request Nov 17, 2024
Router should be optimized for handling 2 kind of prefix resources
(sub_apps and static files are handled equally now):
1. sub_apps are placed under non-overlapped top-level single-segment
prefixed. `test_resolve_gitapi_subapps` benchmark test this case
already.
2. sub_apps shares the same prefix segments, e.g.
`/api/manager/plugin/{name}`.

This PR covers the second case.

(cherry picked from commit 0c31249)
Copy link
Contributor

patchback bot commented Nov 17, 2024

Backport to 3.11: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.11/0c312496c6490f934cec360f21ae802e2c8d8679/pr-9935

Backported as #9937

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

patchback bot pushed a commit that referenced this pull request Nov 17, 2024
Router should be optimized for handling 2 kind of prefix resources
(sub_apps and static files are handled equally now):
1. sub_apps are placed under non-overlapped top-level single-segment
prefixed. `test_resolve_gitapi_subapps` benchmark test this case
already.
2. sub_apps shares the same prefix segments, e.g.
`/api/manager/plugin/{name}`.

This PR covers the second case.

(cherry picked from commit 0c31249)
Copy link
Contributor

patchback bot commented Nov 17, 2024

Backport to 3.12: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.12/0c312496c6490f934cec360f21ae802e2c8d8679/pr-9935

Backported as #9938

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

patchback bot pushed a commit that referenced this pull request Nov 17, 2024
Router should be optimized for handling 2 kind of prefix resources
(sub_apps and static files are handled equally now):
1. sub_apps are placed under non-overlapped top-level single-segment
prefixed. `test_resolve_gitapi_subapps` benchmark test this case
already.
2. sub_apps shares the same prefix segments, e.g.
`/api/manager/plugin/{name}`.

This PR covers the second case.

(cherry picked from commit 0c31249)
asvetlov added a commit that referenced this pull request Nov 17, 2024
…ications (#9936)

**This is a backport of PR #9935 as merged into master
(0c31249).**

Router should be optimized for handling 2 kind of prefix resources
(sub_apps and static files are handled equally now):
1. sub_apps are placed under non-overlapped top-level single-segment
prefixed. `test_resolve_gitapi_subapps` benchmark test this case
already.
2. sub_apps shares the same prefix segments, e.g.
`/api/manager/plugin/{name}`.

This PR covers the second case.

Co-authored-by: Andrew Svetlov <[email protected]>
asvetlov added a commit that referenced this pull request Nov 17, 2024
…ications (#9937)

**This is a backport of PR #9935 as merged into master
(0c31249).**

Router should be optimized for handling 2 kind of prefix resources
(sub_apps and static files are handled equally now):
1. sub_apps are placed under non-overlapped top-level single-segment
prefixed. `test_resolve_gitapi_subapps` benchmark test this case
already.
2. sub_apps shares the same prefix segments, e.g.
`/api/manager/plugin/{name}`.

This PR covers the second case.

Co-authored-by: Andrew Svetlov <[email protected]>
asvetlov added a commit that referenced this pull request Nov 17, 2024
…ications (#9938)

**This is a backport of PR #9935 as merged into master
(0c31249).**

Router should be optimized for handling 2 kind of prefix resources
(sub_apps and static files are handled equally now):
1. sub_apps are placed under non-overlapped top-level single-segment
prefixed. `test_resolve_gitapi_subapps` benchmark test this case
already.
2. sub_apps shares the same prefix segments, e.g.
`/api/manager/plugin/{name}`.

This PR covers the second case.

Co-authored-by: Andrew Svetlov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-3.11 Trigger automatic backporting to the 3.11 release branch by Patchback robot backport-3.12 Trigger automatic backporting to the 3.12 release branch by Patchback robot bot:chronographer:skip This PR does not need to include a change note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant