Link Speed Metrics Proto
Add a histogram of link speed values with count and rssi values.
Collect this metrics only when enabled in settings. By default, we don't
collect this metrics.
Bug: 78354985
Test: Settings Unittest
Change-Id: I683dfb45a01de5e1243d612a117a5544b0d4dc05
diff --git a/proto/src/wifi.proto b/proto/src/wifi.proto
index 4117148..33fc5e5 100644
--- a/proto/src/wifi.proto
+++ b/proto/src/wifi.proto
@@ -466,6 +466,10 @@
// List of WifiIsUnusableEvents which get logged when we notice that WiFi is unusable.
// Collected only when WIFI_IS_UNUSABLE_EVENT_METRICS_ENABLED Settings is enabled.
repeated WifiIsUnusableEvent wifi_is_unusable_event_list = 120;
+
+ // Counts the occurrences of each link speed (Mbps) level
+ // with rssi (dBm) and rssi^2 sums (dBm^2)
+ repeated LinkSpeedCount link_speed_counts = 121;
}
// Information that gets logged for every WiFi connection.
@@ -651,6 +655,22 @@
optional int32 count = 2;
}
+// Number of occurrences of a specific link speed (Mbps)
+// and sum of rssi (dBm) and rssi^2 (dBm^2)
+message LinkSpeedCount {
+ // Link speed (Mbps)
+ optional int32 link_speed_mbps = 1;
+
+ // Number of RSSI polls with link_speed
+ optional int32 count = 2;
+
+ // Sum of absolute values of rssi values (dBm)
+ optional int32 rssi_sum_dbm = 3;
+
+ // Sum of squares of rssi values (dBm^2)
+ optional int64 rssi_sum_of_squares_dbm_sq = 4;
+}
+
// Number of occurrences of Soft AP session durations
message SoftApDurationBucket {
// Bucket covers duration : [duration_sec, duration_sec + bucket_size_sec)
@@ -1532,6 +1552,9 @@
// Minimum number of txSuccess to trigger a data stall
// when rxSuccess is 0
optional int32 wifi_data_stall_min_tx_success_without_rx = 3;
+
+ // Indicates if we are logging LinkSpeedCount in metrics
+ optional bool link_speed_counts_logging_enabled = 4;
}
message WifiIsUnusableEvent {