xref: /aosp_15_r20/external/mobile-data-download/proto/logs.proto (revision 6fa6b5e213d87a73421ed761ee7d492115d5f98c)
1*6fa6b5e2SAndroid Build Coastguard Worker// Copyright 2022 Google LLC
2*6fa6b5e2SAndroid Build Coastguard Worker//
3*6fa6b5e2SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License");
4*6fa6b5e2SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License.
5*6fa6b5e2SAndroid Build Coastguard Worker// You may obtain a copy of the License at
6*6fa6b5e2SAndroid Build Coastguard Worker//
7*6fa6b5e2SAndroid Build Coastguard Worker//      http://www.apache.org/licenses/LICENSE-2.0
8*6fa6b5e2SAndroid Build Coastguard Worker//
9*6fa6b5e2SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software
10*6fa6b5e2SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS,
11*6fa6b5e2SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*6fa6b5e2SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and
13*6fa6b5e2SAndroid Build Coastguard Worker// limitations under the License.
14*6fa6b5e2SAndroid Build Coastguard Worker// Logging protos for MobileDataDownload
15*6fa6b5e2SAndroid Build Coastguard Worker
16*6fa6b5e2SAndroid Build Coastguard Workersyntax = "proto2";
17*6fa6b5e2SAndroid Build Coastguard Worker
18*6fa6b5e2SAndroid Build Coastguard Workerpackage mobiledatadownload.logs;
19*6fa6b5e2SAndroid Build Coastguard Worker
20*6fa6b5e2SAndroid Build Coastguard Workerimport "log_enums.proto";
21*6fa6b5e2SAndroid Build Coastguard Worker
22*6fa6b5e2SAndroid Build Coastguard Workeroption java_package = "com.google.mobiledatadownload";
23*6fa6b5e2SAndroid Build Coastguard Workeroption java_outer_classname = "LogProto";
24*6fa6b5e2SAndroid Build Coastguard Worker
25*6fa6b5e2SAndroid Build Coastguard Worker// Info about the Android client that logged.
26*6fa6b5e2SAndroid Build Coastguard Worker// Next tag: 3
27*6fa6b5e2SAndroid Build Coastguard Workermessage AndroidClientInfo {
28*6fa6b5e2SAndroid Build Coastguard Worker  // Version of the module we are currently running. aMDD will log its own
29*6fa6b5e2SAndroid Build Coastguard Worker  // version that it shares between GMSCore module and library.
30*6fa6b5e2SAndroid Build Coastguard Worker
31*6fa6b5e2SAndroid Build Coastguard Worker  optional int32 module_version = 1 [default = -1];
32*6fa6b5e2SAndroid Build Coastguard Worker
33*6fa6b5e2SAndroid Build Coastguard Worker  // Package name of the hosting application.
34*6fa6b5e2SAndroid Build Coastguard Worker  // It is to differentiate logs from GMS service and library.
35*6fa6b5e2SAndroid Build Coastguard Worker  optional string host_package_name = 2;
36*6fa6b5e2SAndroid Build Coastguard Worker}
37*6fa6b5e2SAndroid Build Coastguard Worker
38*6fa6b5e2SAndroid Build Coastguard Worker// Attributes of the device and/or MDD
39*6fa6b5e2SAndroid Build Coastguard Worker// Recommended to log this message with each MDD log defined below. This will
40*6fa6b5e2SAndroid Build Coastguard Worker// allow slicing MDD stats on the state of the device.
41*6fa6b5e2SAndroid Build Coastguard Worker//
42*6fa6b5e2SAndroid Build Coastguard Worker// TODO: Make Fields of this proto available as RASTA conditions for
43*6fa6b5e2SAndroid Build Coastguard Worker// experimentation.
44*6fa6b5e2SAndroid Build Coastguard Worker//
45*6fa6b5e2SAndroid Build Coastguard Worker// Next tag: 3
46*6fa6b5e2SAndroid Build Coastguard Workermessage MddDeviceInfo {
47*6fa6b5e2SAndroid Build Coastguard Worker  // Indicates low storage space condition on the device.
48*6fa6b5e2SAndroid Build Coastguard Worker  // Currently in O-, it is the result of Android's ACTION_DEVICE_STORAGE_LOW
49*6fa6b5e2SAndroid Build Coastguard Worker  // intent when the storage state was logged.
50*6fa6b5e2SAndroid Build Coastguard Worker  // For O+, MDD will define its own threshold for low storage: b/77856395
51*6fa6b5e2SAndroid Build Coastguard Worker  optional bool device_storage_low = 1;
52*6fa6b5e2SAndroid Build Coastguard Worker
53*6fa6b5e2SAndroid Build Coastguard Worker  reserved 2;
54*6fa6b5e2SAndroid Build Coastguard Worker}
55*6fa6b5e2SAndroid Build Coastguard Worker
56*6fa6b5e2SAndroid Build Coastguard Worker// Metadata associated with each data download event specific to a file group.
57*6fa6b5e2SAndroid Build Coastguard Worker//
58*6fa6b5e2SAndroid Build Coastguard Worker// Next tag: 9
59*6fa6b5e2SAndroid Build Coastguard Workermessage DataDownloadFileGroupStats {
60*6fa6b5e2SAndroid Build Coastguard Worker  // Name of the file group.
61*6fa6b5e2SAndroid Build Coastguard Worker  optional string file_group_name = 1;
62*6fa6b5e2SAndroid Build Coastguard Worker
63*6fa6b5e2SAndroid Build Coastguard Worker  // Client set version number used to identify the file group.
64*6fa6b5e2SAndroid Build Coastguard Worker  // Note that this does not uniquely identify the contents of the file group.
65*6fa6b5e2SAndroid Build Coastguard Worker  // It simply reflects a snapshot of client config changes.
66*6fa6b5e2SAndroid Build Coastguard Worker  // For example: say there's a file group 'language-detector-model' that
67*6fa6b5e2SAndroid Build Coastguard Worker  // downloads a different file per user locale.
68*6fa6b5e2SAndroid Build Coastguard Worker  // data_file_group {
69*6fa6b5e2SAndroid Build Coastguard Worker  //   file_group_name = 'language-detector-model'
70*6fa6b5e2SAndroid Build Coastguard Worker  //   file_group_version_number = 1
71*6fa6b5e2SAndroid Build Coastguard Worker  //   file {
72*6fa6b5e2SAndroid Build Coastguard Worker  //      url = 'en-model'
73*6fa6b5e2SAndroid Build Coastguard Worker  //   }
74*6fa6b5e2SAndroid Build Coastguard Worker  //  }
75*6fa6b5e2SAndroid Build Coastguard Worker  // data_file_group {
76*6fa6b5e2SAndroid Build Coastguard Worker  //   file_group_name = 'language-detector-model'
77*6fa6b5e2SAndroid Build Coastguard Worker  //   file_group_version_number = 1
78*6fa6b5e2SAndroid Build Coastguard Worker  //   file {
79*6fa6b5e2SAndroid Build Coastguard Worker  //      url = 'es-model'
80*6fa6b5e2SAndroid Build Coastguard Worker  //   }
81*6fa6b5e2SAndroid Build Coastguard Worker  //  }
82*6fa6b5e2SAndroid Build Coastguard Worker  // Note that even though the actual contents of the file group are different
83*6fa6b5e2SAndroid Build Coastguard Worker  // for each locale, the version is the same because this config was pushed
84*6fa6b5e2SAndroid Build Coastguard Worker  // at the same snapshot.
85*6fa6b5e2SAndroid Build Coastguard Worker  optional int32 file_group_version_number = 2;
86*6fa6b5e2SAndroid Build Coastguard Worker
87*6fa6b5e2SAndroid Build Coastguard Worker  // The package name of the group owner.
88*6fa6b5e2SAndroid Build Coastguard Worker  optional string owner_package = 3;
89*6fa6b5e2SAndroid Build Coastguard Worker
90*6fa6b5e2SAndroid Build Coastguard Worker  // The total number of files in the file group.
91*6fa6b5e2SAndroid Build Coastguard Worker  //
92*6fa6b5e2SAndroid Build Coastguard Worker  // NOTE: This count is only included for storage and file group stats logging
93*6fa6b5e2SAndroid Build Coastguard Worker  optional int32 file_count = 4;
94*6fa6b5e2SAndroid Build Coastguard Worker
95*6fa6b5e2SAndroid Build Coastguard Worker  // The number of inline files in the file group.
96*6fa6b5e2SAndroid Build Coastguard Worker  //
97*6fa6b5e2SAndroid Build Coastguard Worker  // NOTE: This count is only included for storage and file group stats logging
98*6fa6b5e2SAndroid Build Coastguard Worker  optional int32 inline_file_count = 8;
99*6fa6b5e2SAndroid Build Coastguard Worker
100*6fa6b5e2SAndroid Build Coastguard Worker  // Whether the file group has an account associated with it or not. This will
101*6fa6b5e2SAndroid Build Coastguard Worker  // allow us to slice metrics by having account or not. For more info see
102*6fa6b5e2SAndroid Build Coastguard Worker  // <internal>
103*6fa6b5e2SAndroid Build Coastguard Worker  optional bool has_account = 5;
104*6fa6b5e2SAndroid Build Coastguard Worker
105*6fa6b5e2SAndroid Build Coastguard Worker  // The build id for the file group. Unique identifier for a file group config
106*6fa6b5e2SAndroid Build Coastguard Worker  // created when using MDD Ingress API.
107*6fa6b5e2SAndroid Build Coastguard Worker  // For more details see <internal>.
108*6fa6b5e2SAndroid Build Coastguard Worker  optional int64 build_id = 6;
109*6fa6b5e2SAndroid Build Coastguard Worker
110*6fa6b5e2SAndroid Build Coastguard Worker  // The VariantID of the DataFileGroup. This is set up server side via code
111*6fa6b5e2SAndroid Build Coastguard Worker  // review. For more details see <internal>.
112*6fa6b5e2SAndroid Build Coastguard Worker  // Examples: "en", "de-universal", etc.
113*6fa6b5e2SAndroid Build Coastguard Worker  optional string variant_id = 7;
114*6fa6b5e2SAndroid Build Coastguard Worker}
115*6fa6b5e2SAndroid Build Coastguard Worker
116*6fa6b5e2SAndroid Build Coastguard Worker// The status of a MDD file group. This data is logged periodically to get
117*6fa6b5e2SAndroid Build Coastguard Worker// a snapshot of the status of a file group on devices.
118*6fa6b5e2SAndroid Build Coastguard Worker// Next tag: 5
119*6fa6b5e2SAndroid Build Coastguard Workermessage MddFileGroupStatus {
120*6fa6b5e2SAndroid Build Coastguard Worker  // Download status of the whole file group. This is an AND over the
121*6fa6b5e2SAndroid Build Coastguard Worker  // download status of each file within the file group.
122*6fa6b5e2SAndroid Build Coastguard Worker  optional MddFileGroupDownloadStatus.Code file_group_download_status = 1;
123*6fa6b5e2SAndroid Build Coastguard Worker
124*6fa6b5e2SAndroid Build Coastguard Worker  // Time since epoch when this file group was first added to mdd.
125*6fa6b5e2SAndroid Build Coastguard Worker  //
126*6fa6b5e2SAndroid Build Coastguard Worker  // Set to -1 if this time is unknown (for legacy groups).
127*6fa6b5e2SAndroid Build Coastguard Worker  //
128*6fa6b5e2SAndroid Build Coastguard Worker  // This matches the field "group_new_files_received_timestamp" in metadata
129*6fa6b5e2SAndroid Build Coastguard Worker  // <internal>
130*6fa6b5e2SAndroid Build Coastguard Worker  optional int64 group_added_timestamp_in_seconds = 2;
131*6fa6b5e2SAndroid Build Coastguard Worker
132*6fa6b5e2SAndroid Build Coastguard Worker  // Time since epoch when this file group was downloaded by mdd.
133*6fa6b5e2SAndroid Build Coastguard Worker  //
134*6fa6b5e2SAndroid Build Coastguard Worker  // Set to -1 if this time is unknown (for legacy groups) and non-downloaded
135*6fa6b5e2SAndroid Build Coastguard Worker  // groups
136*6fa6b5e2SAndroid Build Coastguard Worker  //
137*6fa6b5e2SAndroid Build Coastguard Worker  // This matches the field "group_downloaded_timestamp_in_millis" in metadata
138*6fa6b5e2SAndroid Build Coastguard Worker  // <internal>
139*6fa6b5e2SAndroid Build Coastguard Worker  optional int64 group_downloaded_timestamp_in_seconds = 3;
140*6fa6b5e2SAndroid Build Coastguard Worker
141*6fa6b5e2SAndroid Build Coastguard Worker  // Number of days since this status was last logged (number of days since
142*6fa6b5e2SAndroid Build Coastguard Worker  // daily maintenance was last run).
143*6fa6b5e2SAndroid Build Coastguard Worker  //
144*6fa6b5e2SAndroid Build Coastguard Worker  // Set to -1 if there is an invalid or unknown value.
145*6fa6b5e2SAndroid Build Coastguard Worker  //
146*6fa6b5e2SAndroid Build Coastguard Worker  // See <internal> for more info.
147*6fa6b5e2SAndroid Build Coastguard Worker  optional int32 days_since_last_log = 4;
148*6fa6b5e2SAndroid Build Coastguard Worker}
149*6fa6b5e2SAndroid Build Coastguard Worker
150*6fa6b5e2SAndroid Build Coastguard Worker// Various health reports.
151*6fa6b5e2SAndroid Build Coastguard Worker// Ideally, this should be defined as an empty message that allows extensions
152*6fa6b5e2SAndroid Build Coastguard Worker// and each inner proto should be defined as its extension.
153*6fa6b5e2SAndroid Build Coastguard Worker// TODO: Figure out if there are limitations in nano-proto that might
154*6fa6b5e2SAndroid Build Coastguard Worker// not allow this.
155*6fa6b5e2SAndroid Build Coastguard Worker//
156*6fa6b5e2SAndroid Build Coastguard Worker// Next tag: 74
157*6fa6b5e2SAndroid Build Coastguard Workermessage MddLogData {
158*6fa6b5e2SAndroid Build Coastguard Worker  // MDD data download file group stats.
159*6fa6b5e2SAndroid Build Coastguard Worker  optional DataDownloadFileGroupStats data_download_file_group_stats = 10;
160*6fa6b5e2SAndroid Build Coastguard Worker
161*6fa6b5e2SAndroid Build Coastguard Worker  // Sampling interval used while logging this message. The default value 0 is
162*6fa6b5e2SAndroid Build Coastguard Worker  // not a valid value for messages using this filed since it a special value
163*6fa6b5e2SAndroid Build Coastguard Worker  // denoting that message should not be logged. Hence value of 0 means it was
164*6fa6b5e2SAndroid Build Coastguard Worker  // not filled in.
165*6fa6b5e2SAndroid Build Coastguard Worker  optional int64 sampling_interval = 21;
166*6fa6b5e2SAndroid Build Coastguard Worker
167*6fa6b5e2SAndroid Build Coastguard Worker  // Additional info necessary for stable sampling.
168*6fa6b5e2SAndroid Build Coastguard Worker  optional StableSamplingInfo stable_sampling_info = 72;
169*6fa6b5e2SAndroid Build Coastguard Worker
170*6fa6b5e2SAndroid Build Coastguard Worker  // Data download file group download status (logged periodically).
171*6fa6b5e2SAndroid Build Coastguard Worker  optional MddFileGroupStatus mdd_file_group_status = 32;
172*6fa6b5e2SAndroid Build Coastguard Worker
173*6fa6b5e2SAndroid Build Coastguard Worker  // Attributes of the device and/or MDD at the time we log other stats.
174*6fa6b5e2SAndroid Build Coastguard Worker  optional MddDeviceInfo device_info = 40;
175*6fa6b5e2SAndroid Build Coastguard Worker
176*6fa6b5e2SAndroid Build Coastguard Worker  // Android client info.
177*6fa6b5e2SAndroid Build Coastguard Worker  optional AndroidClientInfo android_client_info = 51;
178*6fa6b5e2SAndroid Build Coastguard Worker
179*6fa6b5e2SAndroid Build Coastguard Worker  optional MddStorageStats mdd_storage_stats = 46;
180*6fa6b5e2SAndroid Build Coastguard Worker
181*6fa6b5e2SAndroid Build Coastguard Worker  // MDD download result log.
182*6fa6b5e2SAndroid Build Coastguard Worker  optional MddDownloadResultLog mdd_download_result_log = 63;
183*6fa6b5e2SAndroid Build Coastguard Worker
184*6fa6b5e2SAndroid Build Coastguard Worker  // MDD download latency log.
185*6fa6b5e2SAndroid Build Coastguard Worker  optional MddDownloadLatency mdd_download_latency = 67;
186*6fa6b5e2SAndroid Build Coastguard Worker
187*6fa6b5e2SAndroid Build Coastguard Worker  // MDD Api Result event
188*6fa6b5e2SAndroid Build Coastguard Worker  optional MddLibApiResultLog mdd_lib_api_result_log = 71;
189*6fa6b5e2SAndroid Build Coastguard Worker
190*6fa6b5e2SAndroid Build Coastguard Worker  // MDD File Group Network Stats. Additional info necessary for Network Stats.
191*6fa6b5e2SAndroid Build Coastguard Worker  optional MddNetworkStats mdd_network_stats = 49;
192*6fa6b5e2SAndroid Build Coastguard Worker
193*6fa6b5e2SAndroid Build Coastguard Worker  reserved 1 to 9, 11 to 20, 22 to 31, 33 to 39, 41 to 45, 47 to 48, 50,
194*6fa6b5e2SAndroid Build Coastguard Worker      52 to 62, 64 to 66, 68 to 70, 73;
195*6fa6b5e2SAndroid Build Coastguard Worker}
196*6fa6b5e2SAndroid Build Coastguard Worker
197*6fa6b5e2SAndroid Build Coastguard Worker// Info on sampling method used for log events. Stable sampling means if a
198*6fa6b5e2SAndroid Build Coastguard Worker// device is selected to log, it will log all events. See <internal>
199*6fa6b5e2SAndroid Build Coastguard Worker// Next tag: 5
200*6fa6b5e2SAndroid Build Coastguard Workermessage StableSamplingInfo {
201*6fa6b5e2SAndroid Build Coastguard Worker  // Whether a stable sampling method (as described in <internal>)
202*6fa6b5e2SAndroid Build Coastguard Worker  // was used.
203*6fa6b5e2SAndroid Build Coastguard Worker  optional bool stable_sampling_used = 1;
204*6fa6b5e2SAndroid Build Coastguard Worker
205*6fa6b5e2SAndroid Build Coastguard Worker  // When stable sampling was first enabled on the device. This will be useful
206*6fa6b5e2SAndroid Build Coastguard Worker  // when rolling out and processing logs over multiple days.
207*6fa6b5e2SAndroid Build Coastguard Worker  optional int64 stable_sampling_first_enabled_timestamp_ms = 2;
208*6fa6b5e2SAndroid Build Coastguard Worker
209*6fa6b5e2SAndroid Build Coastguard Worker  // Whether or not this device would log with the 1% cohort. Devices in the 1%
210*6fa6b5e2SAndroid Build Coastguard Worker  // cohort are *always* logging, and will always log without further code
211*6fa6b5e2SAndroid Build Coastguard Worker  // changes. When a device has this set to true, it's expected that the device
212*6fa6b5e2SAndroid Build Coastguard Worker  // is *always* logging and the sampling rate should not be changed to
213*6fa6b5e2SAndroid Build Coastguard Worker  // something that results in this device being excluded from the logging group
214*6fa6b5e2SAndroid Build Coastguard Worker  // (see invalid_sampling_rate_used).
215*6fa6b5e2SAndroid Build Coastguard Worker  //
216*6fa6b5e2SAndroid Build Coastguard Worker  // Most dashboards/metrics depending on linking together multiple events from
217*6fa6b5e2SAndroid Build Coastguard Worker  // the same device should filter to devices/events that have this set to true
218*6fa6b5e2SAndroid Build Coastguard Worker  // (with the caveat that we won't use all data from all devices reporting).
219*6fa6b5e2SAndroid Build Coastguard Worker  // This is useful when we need to change sampling rates, e.g. for an
220*6fa6b5e2SAndroid Build Coastguard Worker  // experiment.
221*6fa6b5e2SAndroid Build Coastguard Worker  optional bool part_of_always_logging_group = 3;
222*6fa6b5e2SAndroid Build Coastguard Worker
223*6fa6b5e2SAndroid Build Coastguard Worker  // If we are using stable sampling, we expect a sampling rate where  '100 %
224*6fa6b5e2SAndroid Build Coastguard Worker  // sample_interval == 0'. This ensures that devices logging at 1 percent
225*6fa6b5e2SAndroid Build Coastguard Worker  // sampling interval, will continue to log at other chosen sampling rates too.
226*6fa6b5e2SAndroid Build Coastguard Worker  // This should only be false if we've incorrectly configured our sampling
227*6fa6b5e2SAndroid Build Coastguard Worker  // rates (e.g. a sampling rate of 101 would mean that the 1 percent cohort
228*6fa6b5e2SAndroid Build Coastguard Worker  // devices would not log).
229*6fa6b5e2SAndroid Build Coastguard Worker  optional bool invalid_sampling_rate_used = 4;
230*6fa6b5e2SAndroid Build Coastguard Worker}
231*6fa6b5e2SAndroid Build Coastguard Worker
232*6fa6b5e2SAndroid Build Coastguard Worker// MDD download result log.
233*6fa6b5e2SAndroid Build Coastguard Workermessage MddDownloadResultLog {
234*6fa6b5e2SAndroid Build Coastguard Worker  optional MddDownloadResult.Code result = 1;
235*6fa6b5e2SAndroid Build Coastguard Worker  // File group information.
236*6fa6b5e2SAndroid Build Coastguard Worker  optional DataDownloadFileGroupStats data_download_file_group_stats = 2;
237*6fa6b5e2SAndroid Build Coastguard Worker}
238*6fa6b5e2SAndroid Build Coastguard Worker
239*6fa6b5e2SAndroid Build Coastguard Worker// MDD Storage stats
240*6fa6b5e2SAndroid Build Coastguard Worker// Next tag 9
241*6fa6b5e2SAndroid Build Coastguard Workermessage MddStorageStats {
242*6fa6b5e2SAndroid Build Coastguard Worker  repeated DataDownloadFileGroupStats data_download_file_group_stats = 1;
243*6fa6b5e2SAndroid Build Coastguard Worker
244*6fa6b5e2SAndroid Build Coastguard Worker  // NOTE: The four repeated fields total_bytes_used, total_inline_bytes_used,
245*6fa6b5e2SAndroid Build Coastguard Worker  // downloaded_group_bytes_used, and downloaded_group_inline_bytes_used have
246*6fa6b5e2SAndroid Build Coastguard Worker  // the same length and an element from all fields with the same index
247*6fa6b5e2SAndroid Build Coastguard Worker  // refers to the same file group.
248*6fa6b5e2SAndroid Build Coastguard Worker
249*6fa6b5e2SAndroid Build Coastguard Worker  // total_bytes_used[x] represents the total bytes used on disk by the
250*6fa6b5e2SAndroid Build Coastguard Worker  // file group index x.
251*6fa6b5e2SAndroid Build Coastguard Worker  repeated uint64 total_bytes_used = 2;
252*6fa6b5e2SAndroid Build Coastguard Worker
253*6fa6b5e2SAndroid Build Coastguard Worker  // total_inline_bytes_used[x] represents the total bytes used on disk by
254*6fa6b5e2SAndroid Build Coastguard Worker  // _inline_ files of file group index x.
255*6fa6b5e2SAndroid Build Coastguard Worker  repeated uint64 total_inline_bytes_used = 7 [packed = true];
256*6fa6b5e2SAndroid Build Coastguard Worker
257*6fa6b5e2SAndroid Build Coastguard Worker  // Similarly, the downloaded_group_bytes_used[x]
258*6fa6b5e2SAndroid Build Coastguard Worker  // represents the bytes used in the corresponding downloaded file group.
259*6fa6b5e2SAndroid Build Coastguard Worker  repeated uint64 downloaded_group_bytes_used = 3;
260*6fa6b5e2SAndroid Build Coastguard Worker
261*6fa6b5e2SAndroid Build Coastguard Worker  // Similarly, the downloaded_group_inline_bytes_used[x] represents the
262*6fa6b5e2SAndroid Build Coastguard Worker  // bytes of _inline_ files used in the corresponding downloaded file group.
263*6fa6b5e2SAndroid Build Coastguard Worker  repeated uint64 downloaded_group_inline_bytes_used = 8 [packed = true];
264*6fa6b5e2SAndroid Build Coastguard Worker
265*6fa6b5e2SAndroid Build Coastguard Worker  // Total bytes used by all MDD file groups.
266*6fa6b5e2SAndroid Build Coastguard Worker  // Measured by adding up file sizes for all files that are known to MDD.
267*6fa6b5e2SAndroid Build Coastguard Worker  optional uint64 total_mdd_bytes_used = 4;
268*6fa6b5e2SAndroid Build Coastguard Worker
269*6fa6b5e2SAndroid Build Coastguard Worker  // Total bytes used by MDD download directory.
270*6fa6b5e2SAndroid Build Coastguard Worker  optional uint64 total_mdd_directory_bytes_used = 5;
271*6fa6b5e2SAndroid Build Coastguard Worker
272*6fa6b5e2SAndroid Build Coastguard Worker  // Number of days since this status was last logged (number of days since
273*6fa6b5e2SAndroid Build Coastguard Worker  // daily maintenance was last run).
274*6fa6b5e2SAndroid Build Coastguard Worker  //
275*6fa6b5e2SAndroid Build Coastguard Worker  // Set to -1 if there is an invalid or unknown value.
276*6fa6b5e2SAndroid Build Coastguard Worker  //
277*6fa6b5e2SAndroid Build Coastguard Worker  // See <internal> for more info.
278*6fa6b5e2SAndroid Build Coastguard Worker  optional int32 days_since_last_log = 6;
279*6fa6b5e2SAndroid Build Coastguard Worker}
280*6fa6b5e2SAndroid Build Coastguard Worker
281*6fa6b5e2SAndroid Build Coastguard Worker// MDD download latency log.
282*6fa6b5e2SAndroid Build Coastguard Worker// Next tag: 4
283*6fa6b5e2SAndroid Build Coastguard Workermessage MddDownloadLatency {
284*6fa6b5e2SAndroid Build Coastguard Worker  // The number of download attempts needed to fully download the file group.
285*6fa6b5e2SAndroid Build Coastguard Worker  optional int32 download_attempt_count = 1;
286*6fa6b5e2SAndroid Build Coastguard Worker  // The download latency in milliseconds, which is the time elapsed between
287*6fa6b5e2SAndroid Build Coastguard Worker  // download started and download complete.
288*6fa6b5e2SAndroid Build Coastguard Worker  optional int64 download_latency_ms = 2;
289*6fa6b5e2SAndroid Build Coastguard Worker  // The total MDD download latency in milliseconds, which is the time elapsed
290*6fa6b5e2SAndroid Build Coastguard Worker  // between new config received from P/H and download complete.
291*6fa6b5e2SAndroid Build Coastguard Worker  // True E2E download latency = PH propagation latency + MDD total download
292*6fa6b5e2SAndroid Build Coastguard Worker  // latency. Here we are talking about the later.
293*6fa6b5e2SAndroid Build Coastguard Worker  optional int64 total_latency_ms = 3;
294*6fa6b5e2SAndroid Build Coastguard Worker}
295*6fa6b5e2SAndroid Build Coastguard Worker
296*6fa6b5e2SAndroid Build Coastguard Worker// MDD Lib API result log.
297*6fa6b5e2SAndroid Build Coastguard Worker// This log will be generated for each MDD Lib API call.
298*6fa6b5e2SAndroid Build Coastguard Worker//
299*6fa6b5e2SAndroid Build Coastguard Worker// Next tag: 5
300*6fa6b5e2SAndroid Build Coastguard Workermessage MddLibApiResultLog {
301*6fa6b5e2SAndroid Build Coastguard Worker  // The API which generated this result.
302*6fa6b5e2SAndroid Build Coastguard Worker  optional MddLibApiName.Code api_used = 1;
303*6fa6b5e2SAndroid Build Coastguard Worker
304*6fa6b5e2SAndroid Build Coastguard Worker  // The result of the API call.
305*6fa6b5e2SAndroid Build Coastguard Worker  optional MddLibApiResult.Code result = 2;
306*6fa6b5e2SAndroid Build Coastguard Worker
307*6fa6b5e2SAndroid Build Coastguard Worker  // Will be populated with relevant file group details depending on the api
308*6fa6b5e2SAndroid Build Coastguard Worker  // type. See MddLibApiName for more details.
309*6fa6b5e2SAndroid Build Coastguard Worker  repeated DataDownloadFileGroupStats data_download_file_group_stats = 3;
310*6fa6b5e2SAndroid Build Coastguard Worker
311*6fa6b5e2SAndroid Build Coastguard Worker  // The latency in nano seconds.
312*6fa6b5e2SAndroid Build Coastguard Worker  optional int64 latency_ns = 4;
313*6fa6b5e2SAndroid Build Coastguard Worker}
314*6fa6b5e2SAndroid Build Coastguard Worker
315*6fa6b5e2SAndroid Build Coastguard Worker// MDD File Group Network stats.
316*6fa6b5e2SAndroid Build Coastguard Workermessage MddGroupNetworkStats {
317*6fa6b5e2SAndroid Build Coastguard Worker  optional DataDownloadFileGroupStats data_download_file_group_stats = 1;
318*6fa6b5e2SAndroid Build Coastguard Worker
319*6fa6b5e2SAndroid Build Coastguard Worker  // The total bytes downloaded through Wifi by the file group.
320*6fa6b5e2SAndroid Build Coastguard Worker  optional int64 total_wifi_bytes = 2;
321*6fa6b5e2SAndroid Build Coastguard Worker
322*6fa6b5e2SAndroid Build Coastguard Worker  // The total bytes downloaded through Cellular by the file group.
323*6fa6b5e2SAndroid Build Coastguard Worker  optional int64 total_cellular_bytes = 3;
324*6fa6b5e2SAndroid Build Coastguard Worker
325*6fa6b5e2SAndroid Build Coastguard Worker  // The total bytes downloaded through ways other than wifi or Cellular by the
326*6fa6b5e2SAndroid Build Coastguard Worker  // file group. E.g. import from local storage & etc.
327*6fa6b5e2SAndroid Build Coastguard Worker  optional int64 total_other_bytes = 4;
328*6fa6b5e2SAndroid Build Coastguard Worker}
329*6fa6b5e2SAndroid Build Coastguard Worker
330*6fa6b5e2SAndroid Build Coastguard Worker// MDD Network stats
331*6fa6b5e2SAndroid Build Coastguard Workermessage MddNetworkStats {
332*6fa6b5e2SAndroid Build Coastguard Worker  message GroupStats {
333*6fa6b5e2SAndroid Build Coastguard Worker    optional DataDownloadFileGroupStats data_download_file_group_stats = 1;
334*6fa6b5e2SAndroid Build Coastguard Worker
335*6fa6b5e2SAndroid Build Coastguard Worker    // The total bytes downloaded through Wifi by the file group.
336*6fa6b5e2SAndroid Build Coastguard Worker    optional uint64 total_wifi_bytes = 2;
337*6fa6b5e2SAndroid Build Coastguard Worker
338*6fa6b5e2SAndroid Build Coastguard Worker    // The total bytes downloaded through Cellular by the file group.
339*6fa6b5e2SAndroid Build Coastguard Worker    optional uint64 total_cellular_bytes = 3;
340*6fa6b5e2SAndroid Build Coastguard Worker  }
341*6fa6b5e2SAndroid Build Coastguard Worker
342*6fa6b5e2SAndroid Build Coastguard Worker  repeated GroupStats group_stats = 1;
343*6fa6b5e2SAndroid Build Coastguard Worker
344*6fa6b5e2SAndroid Build Coastguard Worker  // Total bytes downloaded by all MDD file groups through Wifi.
345*6fa6b5e2SAndroid Build Coastguard Worker  optional uint64 total_mdd_wifi_bytes = 2;
346*6fa6b5e2SAndroid Build Coastguard Worker
347*6fa6b5e2SAndroid Build Coastguard Worker  // Total bytes downloaded by all MDD file groups through Cellular.
348*6fa6b5e2SAndroid Build Coastguard Worker  optional uint64 total_mdd_cellular_bytes = 3;
349*6fa6b5e2SAndroid Build Coastguard Worker}