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

Avoid calling the drain helper in WebSocketWriter if the protocol is not paused #9796

Merged
merged 3 commits into from
Nov 11, 2024

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Nov 11, 2024

We already know its connected or it would have raised for is_closing so we can guard calling the coro with a check to see if its paused

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

codspeed-hq bot commented Nov 11, 2024

CodSpeed Performance Report

Merging #9796 will improve performances by 22.38%

Comparing websocket_avoid_drain_helper (473191b) with master (d1eecea)

Summary

⚡ 1 improvements
✅ 15 untouched benchmarks

Benchmarks breakdown

Benchmark master websocket_avoid_drain_helper Change
test_send_one_hundred_large_websocket_text_messages[pyloop] 658.5 µs 538.1 µs +22.38%

Copy link

codecov bot commented Nov 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.69%. Comparing base (d1eecea) to head (473191b).
Report is 673 commits behind head on master.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #9796   +/-   ##
=======================================
  Coverage   98.69%   98.69%           
=======================================
  Files         118      118           
  Lines       35997    35998    +1     
  Branches     4278     4279    +1     
=======================================
+ Hits        35526    35527    +1     
  Misses        316      316           
  Partials      155      155           
Flag Coverage Δ
CI-GHA 98.58% <100.00%> (+<0.01%) ⬆️
OS-Linux 98.26% <100.00%> (+<0.01%) ⬆️
OS-Windows 96.04% <100.00%> (+<0.01%) ⬆️
OS-macOS 97.34% <100.00%> (+<0.01%) ⬆️
Py-3.10.11 97.18% <100.00%> (+<0.01%) ⬆️
Py-3.10.15 97.74% <100.00%> (+<0.01%) ⬆️
Py-3.11.10 97.79% <100.00%> (-0.01%) ⬇️
Py-3.11.9 97.23% <100.00%> (+<0.01%) ⬆️
Py-3.12.7 98.32% <100.00%> (-0.01%) ⬇️
Py-3.13.0 98.32% <100.00%> (+0.05%) ⬆️
Py-3.9.13 97.10% <100.00%> (+<0.01%) ⬆️
Py-3.9.20 97.66% <100.00%> (+<0.01%) ⬆️
Py-pypy7.3.16 97.27% <100.00%> (+<0.01%) ⬆️
VM-macos 97.34% <100.00%> (+<0.01%) ⬆️
VM-ubuntu 98.26% <100.00%> (+<0.01%) ⬆️
VM-windows 96.04% <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.

@bdraco bdraco changed the title Avoid calling the drain helper in WebSocket writer if the protocol is not paused Avoid calling the drain helper in WebSocketWriter if the protocol is not paused Nov 11, 2024
@bdraco bdraco marked this pull request as ready for review November 11, 2024 03:21
@bdraco bdraco requested a review from asvetlov as a code owner November 11, 2024 03:21
@bdraco bdraco requested a review from webknjaz as a code owner November 11, 2024 03:23
@bdraco bdraco removed the bot:chronographer:skip This PR does not need to include a change note label Nov 11, 2024
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Nov 11, 2024
@bdraco bdraco merged commit b947e47 into master Nov 11, 2024
40 of 41 checks passed
@bdraco bdraco deleted the websocket_avoid_drain_helper branch November 11, 2024 03:42
Copy link
Contributor

patchback bot commented Nov 11, 2024

Backport to 3.11: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.11/b947e476e7f891a80e894af02b6ae1e6ddce940e/pr-9796

Backported as #9797

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

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 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.

1 participant