Amith Yamasani | 38f91ff | 2017-01-10 14:42:38 -0800 | [diff] [blame] | 1 | /* |
| 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 Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 17 | syntax = "proto2"; |
Amith Yamasani | 38f91ff | 2017-01-10 14:42:38 -0800 | [diff] [blame] | 18 | package android.service.diskstats; |
| 19 | |
| 20 | option java_multiple_files = true; |
| 21 | option java_outer_classname = "DiskStatsServiceProto"; |
| 22 | |
| 23 | message 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 Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 35 | optional bool has_test_error = 1; |
Amith Yamasani | 38f91ff | 2017-01-10 14:42:38 -0800 | [diff] [blame] | 36 | // If the test errored, error message is contained here |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 37 | optional string error_message = 2; |
Amith Yamasani | 38f91ff | 2017-01-10 14:42:38 -0800 | [diff] [blame] | 38 | // 512B write latency in milliseconds, if the test was successful |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 39 | optional int32 write_512b_latency_millis = 3; |
Amith Yamasani | 38f91ff | 2017-01-10 14:42:38 -0800 | [diff] [blame] | 40 | // 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 Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 43 | optional EncryptionType encryption = 5; |
Amith Yamasani | 38f91ff | 2017-01-10 14:42:38 -0800 | [diff] [blame] | 44 | // Cached values of folder sizes, etc. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 45 | optional DiskStatsCachedValuesProto cached_folder_sizes = 6; |
Amith Yamasani | 38f91ff | 2017-01-10 14:42:38 -0800 | [diff] [blame] | 46 | } |
| 47 | |
| 48 | message DiskStatsCachedValuesProto { |
Daniel Nishi | b6cc838 | 2017-09-14 17:10:00 -0700 | [diff] [blame] | 49 | // Total app code size, in kilobytes |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 50 | optional int64 agg_apps_size = 1; |
Amith Yamasani | 38f91ff | 2017-01-10 14:42:38 -0800 | [diff] [blame] | 51 | // Total app cache size, in kilobytes |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 52 | optional int64 agg_apps_cache_size = 2; |
Amith Yamasani | 38f91ff | 2017-01-10 14:42:38 -0800 | [diff] [blame] | 53 | // Size of image files, in kilobytes |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 54 | optional int64 photos_size = 3; |
Amith Yamasani | 38f91ff | 2017-01-10 14:42:38 -0800 | [diff] [blame] | 55 | // Size of video files, in kilobytes |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 56 | optional int64 videos_size = 4; |
Amith Yamasani | 38f91ff | 2017-01-10 14:42:38 -0800 | [diff] [blame] | 57 | // Size of audio files, in kilobytes |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 58 | optional int64 audio_size = 5; |
Amith Yamasani | 38f91ff | 2017-01-10 14:42:38 -0800 | [diff] [blame] | 59 | // Size of downloads, in kilobytes |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 60 | optional int64 downloads_size = 6; |
Amith Yamasani | 38f91ff | 2017-01-10 14:42:38 -0800 | [diff] [blame] | 61 | // Size of system directory, in kilobytes |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 62 | optional int64 system_size = 7; |
Amith Yamasani | 38f91ff | 2017-01-10 14:42:38 -0800 | [diff] [blame] | 63 | // Size of other files, in kilobytes |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 64 | optional int64 other_size = 8; |
Amith Yamasani | 38f91ff | 2017-01-10 14:42:38 -0800 | [diff] [blame] | 65 | // Sizes of individual packages |
| 66 | repeated DiskStatsAppSizesProto app_sizes = 9; |
Daniel Nishi | b6cc838 | 2017-09-14 17:10:00 -0700 | [diff] [blame] | 67 | // Total app data size, in kilobytes |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 68 | optional int64 agg_apps_data_size = 10; |
Amith Yamasani | 38f91ff | 2017-01-10 14:42:38 -0800 | [diff] [blame] | 69 | } |
| 70 | |
| 71 | message DiskStatsAppSizesProto { |
| 72 | // Name of the package |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 73 | optional string package_name = 1; |
Daniel Nishi | b6cc838 | 2017-09-14 17:10:00 -0700 | [diff] [blame] | 74 | // App's code size in kilobytes |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 75 | optional int64 app_size = 2; |
Amith Yamasani | 38f91ff | 2017-01-10 14:42:38 -0800 | [diff] [blame] | 76 | // App's cache size in kilobytes |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 77 | optional int64 cache_size = 3; |
Daniel Nishi | b6cc838 | 2017-09-14 17:10:00 -0700 | [diff] [blame] | 78 | // App's data size in kilobytes |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 79 | optional int64 app_data_size = 4; |
Amith Yamasani | 38f91ff | 2017-01-10 14:42:38 -0800 | [diff] [blame] | 80 | } |
| 81 | |
| 82 | message 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 Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 92 | optional Folder folder = 1; |
Amith Yamasani | 38f91ff | 2017-01-10 14:42:38 -0800 | [diff] [blame] | 93 | // Available space, in kilobytes |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 94 | optional int64 available_space = 2; |
Amith Yamasani | 38f91ff | 2017-01-10 14:42:38 -0800 | [diff] [blame] | 95 | // Total space, in kilobytes |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 96 | optional int64 total_space = 3; |
Amith Yamasani | 38f91ff | 2017-01-10 14:42:38 -0800 | [diff] [blame] | 97 | } |