MCPcopy Index your code
hub / github.com/miguelgrinberg/python-socketio / test

Function test

tests/performance/binary_packet.py:5–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3
4
5def test():
6 p = packet.Packet(packet.EVENT, {'foo': b'bar'})
7 start = time.time()
8 count = 0
9 while True:
10 eps = p.encode()
11 p = packet.Packet(encoded_packet=eps[0])
12 for ep in eps[1:]:
13 p.add_attachment(ep)
14 count += 1
15 if time.time() - start >= 5:
16 break
17 return count
18
19
20if __name__ == '__main__':

Callers 1

binary_packet.pyFile · 0.70

Calls 2

encodeMethod · 0.95
add_attachmentMethod · 0.95

Tested by

no test coverage detected