From dc2d249cc462c5eb260b83700b6ec42f681d71ee Mon Sep 17 00:00:00 2001 From: hai007 Date: Wed, 11 Aug 2021 20:56:38 -0700 Subject: [PATCH] For the purpose of better understanding of the WiFi technology device used during Nearby Sharing, We'll log the above parameters into ClearCut server. Storage increase will be: 1.Build version: take RQ3A.210805.001.A1 as example, it needs 18 bytes in one device, so need 36 bytes in two devices. 2.Incoming or outgoing conection ( 4 bytes tech + 4 bytes band + 4 bytes channel + 6 bytes network_operator + 2 bytes country_code + 1 byte tdls + 4 bytes try_counts + 1 byte wifi_ap_status + 4 bytes max_tx_speed + 4 bytes max_rx_speed) = 34 bytes) So need 34*4 = 136 bytes in two directions initial connections and two directions bandwidth upgrades. So there are total 172 bytes grows in each share. (172 bytes in each sharing * 400000 shares/daily * 7 days/week) / GB = about 0.45 GB) (400000 was based on current shares/daily in Prod.) PiperOrigin-RevId: 390282437 --- proto/connections_enums.proto | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/proto/connections_enums.proto b/proto/connections_enums.proto index 8ad75e93..4b34d86d 100644 --- a/proto/connections_enums.proto +++ b/proto/connections_enums.proto @@ -89,6 +89,34 @@ enum Medium { // //depot/google3/third_party/nearby_connections/proto/connections/offline_wire_formats.proto // ) +// The medium technologies used during the sharing. +enum ConnectionTechnology { + CONNECTION_TECHNOLOGY_UNKNOWN_TECHNOLOGY = 0; + CONNECTION_TECHNOLOGY_BLE_GATT = 1; + CONNECTION_TECHNOLOGY_BLE_L2CAP = 2; + CONNECTION_TECHNOLOGY_HOTSPOT_DIRECT = 3; + CONNECTION_TECHNOLOGY_HOTSPOT_LOCALONLY = 4; + CONNECTION_TECHNOLOGY_HOTSPOT_SOFTAP = 5; + CONNECTION_TECHNOLOGY_WEBRTC_WIFI = 6; + CONNECTION_TECHNOLOGY_WEBRTC_MOBILE = 7; + CONNECTION_TECHNOLOGY_WEBRTC_ETHERNET = 8; + CONNECTION_TECHNOLOGY_WEBRTC_VPN = 9; + CONNECTION_TECHNOLOGY_WEBRTC_LOOPBACK = 10; + CONNECTION_TECHNOLOGY_WEBRTC_ADAPTER_TYPE_ANY = 11; +} + +// The WiFi band or cellular band used during the sharing. +enum ConnectionBand { + CONNECTION_BAND_UNKNOWN_BAND = 0; + CONNECTION_BAND_WIFI_BAND_2GHZ = 1; + CONNECTION_BAND_WIFI_BAND_5GHZ = 2; + CONNECTION_BAND_WIFI_BAND_6GHZ = 3; + CONNECTION_BAND_CELLULAR_BAND_2G = 4; + CONNECTION_BAND_CELLULAR_BAND_3G = 5; + CONNECTION_BAND_CELLULAR_BAND_4G = 6; + CONNECTION_BAND_CELLULAR_BAND_5G = 7; +} + // The result of a ConnectionRequest. enum ConnectionRequestResponse { UNKNOWN_CONNECTION_REQUEST_RESPONSE = 0;