Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/aio-libs/aiohttp
/ find_port
Function
find_port
benchmark/async.py:16–21 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
14
15
16
def
find_port():
17
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
18
s.bind((
'localhost'
, 0))
19
host, port = s.getsockname()
20
s.close()
21
return
host, port
22
23
24
profiler = cProfile.Profile()
Callers
1
run
Function · 0.85
Calls
1
close
Method · 0.45
Tested by
no test coverage detected