()
| 3 | |
| 4 | |
| 5 | def main(): |
| 6 | with socketio.SimpleClient() as sio: |
| 7 | sio.connect('http://localhost:5000') |
| 8 | while True: |
| 9 | start_timer = time.time() |
| 10 | sio.emit('ping_from_client') |
| 11 | while sio.receive() != ['pong_from_server']: |
| 12 | pass |
| 13 | latency = time.time() - start_timer |
| 14 | print(f'latency is {latency * 1000:.2f} ms') |
| 15 | |
| 16 | time.sleep(1) |
| 17 | |
| 18 | |
| 19 | if __name__ == '__main__': |
no test coverage detected
searching dependent graphs…