Google uses this robot to check for lags on Android phones16
According to Googler François Beaufort, the company uses a robot built by a Finnish company called OptoFidelity to "measure end-to-end latency of Android and Chrome OS devices." As you can see from the video below, the robot continually taps the screen to measure how the display responds. Beaufort posted about the robot on his Google+ page.
Both hardware and software issues can be responsible for problems detected by the robot. And while there are still occasional lags, the platform has come a long way in becoming a lot smoother. And in the future, perhaps all lags will be eliminated on Android. Machines like the OptoFidelity are one reason for optimism.
source: +François Beaufort via Engadget