Hi,
We can record the input latency for each input event executed using tracing. However, the recorded latency time is from the point the input event was received by the chromium widget (from the system framework) till the frame (updated by the event) has been swapped.
I was wondering is there a way we can measure the actual latency for the input event i.e. the time taken when the user clicks on the screen to the final execution point (i.e. including the time taken to receive the event by Chromium browser framework).
In order to get the real user time, I took input category system traces along with chromium traces (for Android platform). My idea was to check for the time android system received the input event (probably from driver) and when it was received by the chromium framework. THe difference between these two timestamps when added with the latency benchmark time, we can get very close to the actual event latency (in user timespace).
However, to my surprise I found that the first log in system trace for input (deliverInputEvent) is already under the timestamp label of the event whose latency is being marked in trace. So, I was wondering about following queries:
1. What is the timestamp that is present in android system traces.
2. How can we correlate the timestamp present in system trace with the timestamps of chromium browser?
3. If the data captured through android systraces is not enough to do the complete latency calculation (as I tried earlier), how can we best capture this information? Through logs or some other mechanism.
4. From adb logcat, I observed certain InputDispatcher logs, which recorded the timestamp of the received event. Can we use that timestamp for our calculation.
Can somebody guide me about the path to follow to get the real latency time?
Regards,
Ravi Kasibhatla (kphanee)