MCPcopy Index your code
hub / github.com/python-websockets/websockets / run

Function run

example/deployment/kubernetes/benchmark.py:12–16  ·  view source on GitHub ↗
(client_id, messages)

Source from the content-addressed store, hash-verified

10
11
12async def run(client_id, messages):
13 async with connect(URI) as websocket:
14 for message_id in range(messages):
15 await websocket.send(f"{client_id}:{message_id}")
16 await websocket.recv()
17
18
19async def benchmark(clients, messages):

Callers 1

benchmarkFunction · 0.85

Calls 3

connectFunction · 0.90
sendMethod · 0.45
recvMethod · 0.45

Tested by

no test coverage detected