
Walt: A device for measuring latency of physical sensors and outputs - ingve
https://github.com/google/walt
======
modeless
I wish every developer had one of these. When you think about it, it's crazy
that our devices don't have built-in APIs for measuring this stuff. The
latencies are all known exactly at the time the various pieces of hardware are
designed, but when the system is integrated that information is lost and
suddenly there's no way for the software to know exactly when the finger
physically touched the screen, or exactly when the pixels start lighting up,
or exactly when the speaker will start vibrating.

In most cases it actually takes less time to send a network packet to a server
thousands of miles away than it takes to change a single pixel on the local
display. Wouldn't it be great if you could measure the display latency as
easily as you can run 'ping'?

------
javajosh
I get that the accelerometer detects the touch, and that one of the
photodiodes detects a screen change, and there's another input for the mic as
well. But I don't understand the purpose of the laser/laser photodiode. What
is that detecting exactly? Also, where does the output of this thing go and
how is it encoded? Does it go back to the device you're testing and does that
affect latency?

~~~
adlr
It's for drag latency:
[https://github.com/google/walt/blob/master/docs/DragLatency....](https://github.com/google/walt/blob/master/docs/DragLatency.md)

It may be counter intuitive, but touch-down latency and drag latency can be
very different: on some hardware one may be faster or slower than the other.
That's why both are measured.

Note: I worked with Mark to review most of his work on this project.

------
taneq
This reminds me of the Oculus Latency Tester:
[https://vrwiki.wikispaces.com/Oculus+Latency+Tester](https://vrwiki.wikispaces.com/Oculus+Latency+Tester)

It seems crazy to me that similar things aren't more common. You can't
optimize what you can't measure.

------
dplarson
Neat, they use a Teensy microcontroller with an accelerometer breakout board
from Adafruit for the hardware.

~~~
fapjacks
I _love_ the Teensy! I've got a ton of them.

