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

Move benchmark to scripts. #965

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion httpcore/_backends/trio.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def get_extra_info(self, info: str) -> typing.Any:
if info == "ssl_object" and isinstance(self._stream, trio.SSLStream):
# Type checkers cannot see `_ssl_object` attribute because trio._ssl.SSLStream uses __getattr__/__setattr__.
# Tracked at https://github.com/python-trio/trio/issues/542
return self._stream._ssl_object # type: ignore[attr-defined]
return self._stream._ssl_object
if info == "client_addr":
return self._get_socket_stream().socket.getsockname()
if info == "server_addr":
Expand Down
8 changes: 0 additions & 8 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,7 @@ twine==5.1.1
coverage[toml]==7.5.4
ruff==0.5.0
mypy==1.10.1
trio-typing==0.10.0
pytest==8.2.2
pytest-httpbin==2.0.0
pytest-trio==0.8.0
werkzeug<3.1 # See: https://github.com/psf/httpbin/issues/35

# Benchmarking and profiling
uvicorn==0.30.1
aiohttp==3.10.2
urllib3==2.2.2
matplotlib==3.7.5
pyinstrument==4.6.2
T-256 marked this conversation as resolved.
Show resolved Hide resolved
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions scripts/benchmark
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ fi

set -x

${PREFIX}python tests/benchmark/server.py &
${PREFIX}python scripts/bench/server.py &
SERVER_PID=$!
EXIT_CODE=0
${PREFIX}python tests/benchmark/client.py "$@" || EXIT_CODE=$?
${PREFIX}python scripts/bench/client.py "$@" || EXIT_CODE=$?
kill $SERVER_PID
exit $EXIT_CODE
Loading