MCPcopy Create free account
hub / github.com/miguelgrinberg/python-socketio / test

Function test

tests/performance/server_send_broadcast.py:13–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11
12
13def test():
14 s = Server()
15 start = time.time()
16 count = 0
17 for i in range(100):
18 s._handle_eio_connect(str(i), 'environ')
19 s._handle_eio_message(str(i), '0')
20 while True:
21 s.emit('test', 'hello')
22 count += 1
23 if time.time() - start >= 5:
24 break
25 return count
26
27
28if __name__ == '__main__':

Callers 1

Calls 4

_handle_eio_connectMethod · 0.95
_handle_eio_messageMethod · 0.95
emitMethod · 0.95
ServerClass · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…