BluetoothMetrics: Add BluetoothCodePathCounter and BluetoothLeBatchScanReportDelay
Test: Build
Bug: 196416567
Change-Id: I60e7757fa294059c5047d656790028700b73c993
Merged-In: I60e7757fa294059c5047d656790028700b73c993
(cherry picked from commit bc09b0c71f94d7243483a862a3bcd6e66e2fd38b)
diff --git a/stats/atoms.proto b/stats/atoms.proto
index 0e94741..2f0e72c 100644
--- a/stats/atoms.proto
+++ b/stats/atoms.proto
@@ -511,6 +511,10 @@
OdrefreshReported odrefresh_reported = 366 [(module) = "art"];
NetworkIpReachabilityMonitorReported network_ip_reachability_monitor_reported =
367 [(module) = "network_stack"];
+ BluetoothCodePathCounter bluetooth_code_path_counter =
+ 390 [(module) = "bluetooth"];
+ BluetoothLeBatchScanReportDelay bluetooth_le_batch_scan_report_delay =
+ 392 [(module) = "bluetooth"];
// StatsdStats tracks platform atoms with ids upto 500.
// Update StatsdStats::kMaxPushedAtomId when atom ids here approach that value.
@@ -2861,6 +2865,35 @@
}
/**
+ * Logs when the counter is incremented
+ *
+ * Logged from:
+ * system/bt
+ * packages/apps/Bluetooth
+ *
+ */
+message BluetoothCodePathCounter {
+ // Keys of events with enum ranges to be defined
+ optional android.bluetooth.CodePathCounterKeyEnum key = 1;
+ // Number of frequency of events
+ optional int64 number = 2;
+}
+
+/**
+ * Logs when an application attempts to start a Bluetooth Low Energy scan.
+ * It only happens when the scan is initiated and does not repeatedly call
+ * while the scan is running.
+ *
+ * Logged from:
+ * packages/apps/Bluetooth/src/com/android/bluetooth/gatt/GattService.java
+ *
+ */
+message BluetoothLeBatchScanReportDelay {
+ optional int32 application_uid = 1;
+ optional int64 application_report_delay_millis = 2;
+}
+
+/**
* Logs when something is plugged into or removed from the USB-C connector.
*
* Logged from:
diff --git a/stats/enums/bluetooth/enums.proto b/stats/enums/bluetooth/enums.proto
index e7b1375..3b5fdc7 100644
--- a/stats/enums/bluetooth/enums.proto
+++ b/stats/enums/bluetooth/enums.proto
@@ -141,3 +141,7 @@
SOCKET_ROLE_LISTEN = 1;
SOCKET_ROLE_CONNECTION = 2;
}
+
+enum CodePathCounterKeyEnum {
+ KEY_UNKNOWN = 0;
+}