Adding Metrics/protos in the ConnectivityService
Copy following network slice metric's protos from stats/atoms.proto
into ConnectivityService module.
1. NetworkSliceRequestCountSample
2. NetworkSliceSessionEnded
3. NetworkSliceDailyDataUsageReported
Bug: 255564255
Test: statsd_testdrive
Change-Id: I2dda17e05f4a5e7bdc25902b88b1801a954d13e3
diff --git a/service/src/com/android/metrics/stats.proto b/service/src/com/android/metrics/stats.proto
index 48b8316..8104632 100644
--- a/service/src/com/android/metrics/stats.proto
+++ b/service/src/com/android/metrics/stats.proto
@@ -284,3 +284,66 @@
// The latency of selection issued in milli-second
optional int32 selection_issued_latency_milli = 5;
}
+
+message NetworkSliceRequestCountSample {
+ // Bitfield representing the network's capability(e.g. NET_CAPABILITY_PRIORITIZE_LATENCY),
+ // defined in packages/modules/Connectivity/framework/src/android/net/NetworkCapabilities.java
+ optional int64 slice_id = 1;
+
+ // Bitfield representing the network's enterprise capability identifier
+ // (e.g. NET_ENTERPRISE_ID_1), defined in
+ // packages/modules/Connectivity/framework/src/android/net/NetworkCapabilities.java
+ optional int32 enterprise_id = 2;
+
+ // number of request for this slice
+ optional int32 request_count = 3;
+
+ // number of apps with outstanding request(s) for this slice
+ optional int32 distinct_app_count = 4;
+}
+
+message NetworkSliceSessionEnded {
+ // Bitfield representing the network's capability(e.g. NET_CAPABILITY_PRIORITIZE_LATENCY),
+ // defined in packages/modules/Connectivity/framework/src/android/net/NetworkCapabilities.java
+ optional int64 slice_id = 1;
+
+ // Bitfield representing the network's enterprise capability identifier
+ // (e.g. NET_ENTERPRISE_ID_1), defined in
+ // packages/modules/Connectivity/framework/src/android/net/NetworkCapabilities.java
+ optional int32 enterprise_id = 2;
+
+ // Number of bytes received at the device on this slice id
+ optional int64 rx_bytes = 3;
+
+ // Number of bytes transmitted by the device on this slice id
+ optional int64 tx_bytes = 4;
+
+ // Number of apps that have used this slice
+ optional int32 number_of_apps = 5;
+
+ // How long(in seconds) this slice has been connected
+ optional int32 slice_connection_duration_sec = 6;
+}
+
+message NetworkSliceDailyDataUsageReported {
+ // Bitfield representing the network's capability(e.g. NET_CAPABILITY_PRIORITIZE_LATENCY),
+ // defined in packages/modules/Connectivity/framework/src/android/net/NetworkCapabilities.java
+ optional int64 slice_id = 1;
+
+ // Bitfield representing the network's enterprise capability identifier
+ // (e.g. NET_ENTERPRISE_ID_1), defined in
+ // packages/modules/Connectivity/framework/src/android/net/NetworkCapabilities.java
+ optional int32 enterprise_id = 2;
+
+ // Number of bytes received at the device on this slice id
+ optional int64 rx_bytes = 3;
+
+ // Number of bytes transmitted by the device on this slice id
+ optional int64 tx_bytes = 4;
+
+ // Number of apps that have used this slice
+ optional int32 number_of_apps = 5;
+
+ // How long(in seconds) this slice has been connected
+ optional int32 slice_connection_duration_sec = 6;
+}