blob: f725e8a8c7dab35a94f65126971509d85a5895ee [file] [log] [blame]
Amith Yamasani38f91ff2017-01-10 14:42:38 -08001/*
2 * Copyright (C) 2017 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Yi Jinc7f93072017-09-29 15:29:38 -070017syntax = "proto2";
Amith Yamasani38f91ff2017-01-10 14:42:38 -080018package android.service.diskstats;
19
20option java_multiple_files = true;
21option java_outer_classname = "DiskStatsServiceProto";
22
23message DiskStatsServiceDumpProto {
24 enum EncryptionType {
25 // Unknown encryption type
26 ENCRYPTION_UNKNOWN = 0;
27 // No encryption
28 ENCRYPTION_NONE = 1;
29 // Full disk encryption
30 ENCRYPTION_FULL_DISK = 2;
31 // File-based encryption
32 ENCRYPTION_FILE_BASED = 3;
33 }
34 // Whether the latency test resulted in an error
Yi Jinc7f93072017-09-29 15:29:38 -070035 optional bool has_test_error = 1;
Amith Yamasani38f91ff2017-01-10 14:42:38 -080036 // If the test errored, error message is contained here
Yi Jinc7f93072017-09-29 15:29:38 -070037 optional string error_message = 2;
Amith Yamasani38f91ff2017-01-10 14:42:38 -080038 // 512B write latency in milliseconds, if the test was successful
Yi Jinc7f93072017-09-29 15:29:38 -070039 optional int32 write_512b_latency_millis = 3;
Amith Yamasani38f91ff2017-01-10 14:42:38 -080040 // Free Space in the major partitions
41 repeated DiskStatsFreeSpaceProto partitions_free_space = 4;
42 // Is the device using file-based encryption, full disk encryption or other
Yi Jinc7f93072017-09-29 15:29:38 -070043 optional EncryptionType encryption = 5;
Amith Yamasani38f91ff2017-01-10 14:42:38 -080044 // Cached values of folder sizes, etc.
Yi Jinc7f93072017-09-29 15:29:38 -070045 optional DiskStatsCachedValuesProto cached_folder_sizes = 6;
Amith Yamasani38f91ff2017-01-10 14:42:38 -080046}
47
48message DiskStatsCachedValuesProto {
Daniel Nishib6cc8382017-09-14 17:10:00 -070049 // Total app code size, in kilobytes
Yi Jinc7f93072017-09-29 15:29:38 -070050 optional int64 agg_apps_size = 1;
Amith Yamasani38f91ff2017-01-10 14:42:38 -080051 // Total app cache size, in kilobytes
Yi Jinc7f93072017-09-29 15:29:38 -070052 optional int64 agg_apps_cache_size = 2;
Amith Yamasani38f91ff2017-01-10 14:42:38 -080053 // Size of image files, in kilobytes
Yi Jinc7f93072017-09-29 15:29:38 -070054 optional int64 photos_size = 3;
Amith Yamasani38f91ff2017-01-10 14:42:38 -080055 // Size of video files, in kilobytes
Yi Jinc7f93072017-09-29 15:29:38 -070056 optional int64 videos_size = 4;
Amith Yamasani38f91ff2017-01-10 14:42:38 -080057 // Size of audio files, in kilobytes
Yi Jinc7f93072017-09-29 15:29:38 -070058 optional int64 audio_size = 5;
Amith Yamasani38f91ff2017-01-10 14:42:38 -080059 // Size of downloads, in kilobytes
Yi Jinc7f93072017-09-29 15:29:38 -070060 optional int64 downloads_size = 6;
Amith Yamasani38f91ff2017-01-10 14:42:38 -080061 // Size of system directory, in kilobytes
Yi Jinc7f93072017-09-29 15:29:38 -070062 optional int64 system_size = 7;
Amith Yamasani38f91ff2017-01-10 14:42:38 -080063 // Size of other files, in kilobytes
Yi Jinc7f93072017-09-29 15:29:38 -070064 optional int64 other_size = 8;
Amith Yamasani38f91ff2017-01-10 14:42:38 -080065 // Sizes of individual packages
66 repeated DiskStatsAppSizesProto app_sizes = 9;
Daniel Nishib6cc8382017-09-14 17:10:00 -070067 // Total app data size, in kilobytes
Yi Jinc7f93072017-09-29 15:29:38 -070068 optional int64 agg_apps_data_size = 10;
Amith Yamasani38f91ff2017-01-10 14:42:38 -080069}
70
71message DiskStatsAppSizesProto {
72 // Name of the package
Yi Jinc7f93072017-09-29 15:29:38 -070073 optional string package_name = 1;
Daniel Nishib6cc8382017-09-14 17:10:00 -070074 // App's code size in kilobytes
Yi Jinc7f93072017-09-29 15:29:38 -070075 optional int64 app_size = 2;
Amith Yamasani38f91ff2017-01-10 14:42:38 -080076 // App's cache size in kilobytes
Yi Jinc7f93072017-09-29 15:29:38 -070077 optional int64 cache_size = 3;
Daniel Nishib6cc8382017-09-14 17:10:00 -070078 // App's data size in kilobytes
Yi Jinc7f93072017-09-29 15:29:38 -070079 optional int64 app_data_size = 4;
Amith Yamasani38f91ff2017-01-10 14:42:38 -080080}
81
82message DiskStatsFreeSpaceProto {
83 enum Folder {
84 // Data folder
85 FOLDER_DATA = 0;
86 // Cache folder
87 FOLDER_CACHE = 1;
88 // System folder
89 FOLDER_SYSTEM = 2;
90 }
91 // Which folder?
Yi Jinc7f93072017-09-29 15:29:38 -070092 optional Folder folder = 1;
Amith Yamasani38f91ff2017-01-10 14:42:38 -080093 // Available space, in kilobytes
Yi Jinc7f93072017-09-29 15:29:38 -070094 optional int64 available_space = 2;
Amith Yamasani38f91ff2017-01-10 14:42:38 -080095 // Total space, in kilobytes
Yi Jinc7f93072017-09-29 15:29:38 -070096 optional int64 total_space = 3;
Amith Yamasani38f91ff2017-01-10 14:42:38 -080097}