blob: 3d7ee914074e684d101216c813438c25771838b9 [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
Yi Jin0d7bc2d12018-01-23 17:35:19 -080020import "frameworks/base/libs/incident/proto/android/privacy.proto";
21
Amith Yamasani38f91ff2017-01-10 14:42:38 -080022option java_multiple_files = true;
23option java_outer_classname = "DiskStatsServiceProto";
24
25message DiskStatsServiceDumpProto {
Yi Jin0d7bc2d12018-01-23 17:35:19 -080026 option (android.msg_privacy).dest = DEST_AUTOMATIC;
27
Amith Yamasani38f91ff2017-01-10 14:42:38 -080028 enum EncryptionType {
29 // Unknown encryption type
30 ENCRYPTION_UNKNOWN = 0;
31 // No encryption
32 ENCRYPTION_NONE = 1;
33 // Full disk encryption
34 ENCRYPTION_FULL_DISK = 2;
35 // File-based encryption
36 ENCRYPTION_FILE_BASED = 3;
37 }
38 // Whether the latency test resulted in an error
Yi Jinc7f93072017-09-29 15:29:38 -070039 optional bool has_test_error = 1;
Amith Yamasani38f91ff2017-01-10 14:42:38 -080040 // If the test errored, error message is contained here
Yi Jin0d7bc2d12018-01-23 17:35:19 -080041 optional string error_message = 2 [ (android.privacy).dest = DEST_EXPLICIT ];
Amith Yamasani38f91ff2017-01-10 14:42:38 -080042 // 512B write latency in milliseconds, if the test was successful
Yi Jinc7f93072017-09-29 15:29:38 -070043 optional int32 write_512b_latency_millis = 3;
Amith Yamasani38f91ff2017-01-10 14:42:38 -080044 // Free Space in the major partitions
45 repeated DiskStatsFreeSpaceProto partitions_free_space = 4;
46 // Is the device using file-based encryption, full disk encryption or other
Yi Jinc7f93072017-09-29 15:29:38 -070047 optional EncryptionType encryption = 5;
Amith Yamasani38f91ff2017-01-10 14:42:38 -080048 // Cached values of folder sizes, etc.
Yi Jinc7f93072017-09-29 15:29:38 -070049 optional DiskStatsCachedValuesProto cached_folder_sizes = 6;
Michael Wachenschwanz3e20a102017-12-14 18:32:14 -080050 // Average write speed of storaged benchmark for last 24 hours
51 optional int32 benchmarked_write_speed_kbps = 7;
Amith Yamasani38f91ff2017-01-10 14:42:38 -080052}
53
54message DiskStatsCachedValuesProto {
Yi Jin0d7bc2d12018-01-23 17:35:19 -080055 option (android.msg_privacy).dest = DEST_AUTOMATIC;
56
Daniel Nishib6cc8382017-09-14 17:10:00 -070057 // Total app code size, in kilobytes
Yi Jinc7f93072017-09-29 15:29:38 -070058 optional int64 agg_apps_size = 1;
Amith Yamasani38f91ff2017-01-10 14:42:38 -080059 // Total app cache size, in kilobytes
Yi Jinc7f93072017-09-29 15:29:38 -070060 optional int64 agg_apps_cache_size = 2;
Amith Yamasani38f91ff2017-01-10 14:42:38 -080061 // Size of image files, in kilobytes
Yi Jinc7f93072017-09-29 15:29:38 -070062 optional int64 photos_size = 3;
Amith Yamasani38f91ff2017-01-10 14:42:38 -080063 // Size of video files, in kilobytes
Yi Jinc7f93072017-09-29 15:29:38 -070064 optional int64 videos_size = 4;
Amith Yamasani38f91ff2017-01-10 14:42:38 -080065 // Size of audio files, in kilobytes
Yi Jinc7f93072017-09-29 15:29:38 -070066 optional int64 audio_size = 5;
Amith Yamasani38f91ff2017-01-10 14:42:38 -080067 // Size of downloads, in kilobytes
Yi Jinc7f93072017-09-29 15:29:38 -070068 optional int64 downloads_size = 6;
Amith Yamasani38f91ff2017-01-10 14:42:38 -080069 // Size of system directory, in kilobytes
Yi Jinc7f93072017-09-29 15:29:38 -070070 optional int64 system_size = 7;
Amith Yamasani38f91ff2017-01-10 14:42:38 -080071 // Size of other files, in kilobytes
Yi Jinc7f93072017-09-29 15:29:38 -070072 optional int64 other_size = 8;
Amith Yamasani38f91ff2017-01-10 14:42:38 -080073 // Sizes of individual packages
74 repeated DiskStatsAppSizesProto app_sizes = 9;
Daniel Nishib6cc8382017-09-14 17:10:00 -070075 // Total app data size, in kilobytes
Yi Jinc7f93072017-09-29 15:29:38 -070076 optional int64 agg_apps_data_size = 10;
Amith Yamasani38f91ff2017-01-10 14:42:38 -080077}
78
79message DiskStatsAppSizesProto {
Yi Jin0d7bc2d12018-01-23 17:35:19 -080080 option (android.msg_privacy).dest = DEST_AUTOMATIC;
81
Amith Yamasani38f91ff2017-01-10 14:42:38 -080082 // Name of the package
Yi Jinc7f93072017-09-29 15:29:38 -070083 optional string package_name = 1;
Daniel Nishib6cc8382017-09-14 17:10:00 -070084 // App's code size in kilobytes
Yi Jinc7f93072017-09-29 15:29:38 -070085 optional int64 app_size = 2;
Amith Yamasani38f91ff2017-01-10 14:42:38 -080086 // App's cache size in kilobytes
Yi Jinc7f93072017-09-29 15:29:38 -070087 optional int64 cache_size = 3;
Daniel Nishib6cc8382017-09-14 17:10:00 -070088 // App's data size in kilobytes
Yi Jinc7f93072017-09-29 15:29:38 -070089 optional int64 app_data_size = 4;
Amith Yamasani38f91ff2017-01-10 14:42:38 -080090}
91
92message DiskStatsFreeSpaceProto {
Yi Jin0d7bc2d12018-01-23 17:35:19 -080093 option (android.msg_privacy).dest = DEST_AUTOMATIC;
94
Amith Yamasani38f91ff2017-01-10 14:42:38 -080095 enum Folder {
96 // Data folder
97 FOLDER_DATA = 0;
98 // Cache folder
99 FOLDER_CACHE = 1;
100 // System folder
101 FOLDER_SYSTEM = 2;
102 }
103 // Which folder?
Yi Jinc7f93072017-09-29 15:29:38 -0700104 optional Folder folder = 1;
Amith Yamasani38f91ff2017-01-10 14:42:38 -0800105 // Available space, in kilobytes
Yi Jinc7f93072017-09-29 15:29:38 -0700106 optional int64 available_space = 2;
Amith Yamasani38f91ff2017-01-10 14:42:38 -0800107 // Total space, in kilobytes
Yi Jinc7f93072017-09-29 15:29:38 -0700108 optional int64 total_space = 3;
Amith Yamasani38f91ff2017-01-10 14:42:38 -0800109}