Touch event latency metrics
Add a basic metric about touch event latency.
Metric design doc:
https://docs.google.com/document/d/1funj0dM9oZMiivhz43U5WM2wA2zWiPWsOxO-Jl5PmbY/edit#
Bug: 111431676
Bug: 122748138
Test: manual test following procedures in the doc
Change-Id: Ifc2643b53c2211f67355b27c2ab4e706c00eae97
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto
index ef3eac0..33320e7 100644
--- a/cmds/statsd/src/atoms.proto
+++ b/cmds/statsd/src/atoms.proto
@@ -91,7 +91,7 @@
ChargingStateChanged charging_state_changed = 31;
PluggedStateChanged plugged_state_changed = 32;
InteractiveStateChanged interactive_state_changed = 33;
- // 34 is available
+ TouchEventReported touch_event_reported = 34;
WakeupAlarmOccurred wakeup_alarm_occurred = 35;
KernelWakeupReported kernel_wakeup_reported = 36;
WifiLockStateChanged wifi_lock_state_changed = 37;
@@ -1735,6 +1735,33 @@
}
/**
+ * Logs basic timing information about touch events.
+ * Reported at most every 5 minutes while device is being interacted with.
+ *
+ * Logged from:
+ * frameworks/native/services/inputflinger
+ */
+message TouchEventReported {
+ /**
+ * The fields latency_{min|max|mean|stdev} represent minimum, maximum, mean,
+ * and the standard deviation of latency between the kernel and framework
+ * for touchscreen events. The units are microseconds.
+ *
+ * The number is measured as the difference between the time at which
+ * the input event was received in the evdev driver,
+ * and the time at which the input event was received in EventHub.
+ */
+ // Minimum value
+ optional float latency_min_micros = 1;
+ // Maximum value
+ optional float latency_max_micros = 2;
+ // Average value
+ optional float latency_mean_micros = 3;
+ // Standard deviation
+ optional float latency_stdev_micros = 4;
+}
+
+/**
* Logs that a setting was updated.
* Logged from:
* frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java