pioneers / runtime

Firmware for the PiE kit robots and devices
7 stars 2 forks source link

[TEST] Investigate latency in client functions #171

Open levincent06 opened 3 years ago

levincent06 commented 3 years ago

In our tests, we've always had to have a sleep(1) after using client functions in order to let them take effect. Examples include sending run mode, sending gamepad input and connecting a virtual device. This is slow, given that it takes only 1ms for a signal to be processed from net handler to an already connected virtual device (as seen from tc_71_10).

We should investigate why we need to sleep for so long. This will drastically speed up our tests and potentially speed up Runtime itself.

connect_virtual_device() may take long because it involves spawning a new process for the device and connecting a socket to dev handler.