John Reck | df1742e | 2017-01-19 15:56:21 -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"; |
John Reck | df1742e | 2017-01-19 15:56:21 -0800 | [diff] [blame] | 18 | package android.service; |
| 19 | |
| 20 | option java_multiple_files = true; |
| 21 | option java_outer_classname = "GraphicsStatsServiceProto"; |
John Reck | df1742e | 2017-01-19 15:56:21 -0800 | [diff] [blame] | 22 | |
Kweku Adams | 1856a4c | 2018-04-03 16:31:10 -0700 | [diff] [blame] | 23 | import "frameworks/base/libs/incident/proto/android/privacy.proto"; |
| 24 | |
| 25 | // This file is based on frameworks/base/libs/hwui/protos/graphicsstats.proto. |
| 26 | // Please try to keep the two files in sync. |
| 27 | |
John Reck | df1742e | 2017-01-19 15:56:21 -0800 | [diff] [blame] | 28 | message GraphicsStatsServiceDumpProto { |
Kweku Adams | 1856a4c | 2018-04-03 16:31:10 -0700 | [diff] [blame] | 29 | option (android.msg_privacy).dest = DEST_AUTOMATIC; |
| 30 | |
John Reck | df1742e | 2017-01-19 15:56:21 -0800 | [diff] [blame] | 31 | repeated GraphicsStatsProto stats = 1; |
| 32 | } |
| 33 | |
| 34 | message GraphicsStatsProto { |
Kweku Adams | 1856a4c | 2018-04-03 16:31:10 -0700 | [diff] [blame] | 35 | option (android.msg_privacy).dest = DEST_AUTOMATIC; |
John Reck | df1742e | 2017-01-19 15:56:21 -0800 | [diff] [blame] | 36 | |
| 37 | // The package name of the app |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 38 | optional string package_name = 1; |
John Reck | df1742e | 2017-01-19 15:56:21 -0800 | [diff] [blame] | 39 | |
| 40 | // The version code of the app |
Dianne Hackborn | 73453e4 | 2017-12-11 16:30:36 -0800 | [diff] [blame] | 41 | optional int64 version_code = 2; |
John Reck | df1742e | 2017-01-19 15:56:21 -0800 | [diff] [blame] | 42 | |
| 43 | // The start & end timestamps in UTC as |
| 44 | // milliseconds since January 1, 1970 |
| 45 | // Compatible with java.util.Date#setTime() |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 46 | optional int64 stats_start = 3; |
| 47 | optional int64 stats_end = 4; |
John Reck | df1742e | 2017-01-19 15:56:21 -0800 | [diff] [blame] | 48 | |
| 49 | // The aggregated statistics for the package |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 50 | optional GraphicsStatsJankSummaryProto summary = 5; |
John Reck | df1742e | 2017-01-19 15:56:21 -0800 | [diff] [blame] | 51 | |
| 52 | // The frame time histogram for the package |
| 53 | repeated GraphicsStatsHistogramBucketProto histogram = 6; |
| 54 | } |
| 55 | |
| 56 | message GraphicsStatsJankSummaryProto { |
Kweku Adams | 1856a4c | 2018-04-03 16:31:10 -0700 | [diff] [blame] | 57 | option (android.msg_privacy).dest = DEST_AUTOMATIC; |
| 58 | |
John Reck | df1742e | 2017-01-19 15:56:21 -0800 | [diff] [blame] | 59 | // Distinct frame count. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 60 | optional int32 total_frames = 1; |
John Reck | df1742e | 2017-01-19 15:56:21 -0800 | [diff] [blame] | 61 | |
| 62 | // Number of frames with slow render time. Frames are considered janky if |
| 63 | // they took more than a vsync interval (typically 16.667ms) to be rendered. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 64 | optional int32 janky_frames = 2; |
John Reck | df1742e | 2017-01-19 15:56:21 -0800 | [diff] [blame] | 65 | |
| 66 | // Number of "missed vsync" events. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 67 | optional int32 missed_vsync_count = 3; |
John Reck | df1742e | 2017-01-19 15:56:21 -0800 | [diff] [blame] | 68 | |
John Reck | 0e48647 | 2018-03-19 14:06:16 -0700 | [diff] [blame] | 69 | // Number of frames in triple-buffering scenario (high input latency) |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 70 | optional int32 high_input_latency_count = 4; |
John Reck | df1742e | 2017-01-19 15:56:21 -0800 | [diff] [blame] | 71 | |
| 72 | // Number of "slow UI thread" events. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 73 | optional int32 slow_ui_thread_count = 5; |
John Reck | df1742e | 2017-01-19 15:56:21 -0800 | [diff] [blame] | 74 | |
| 75 | // Number of "slow bitmap upload" events. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 76 | optional int32 slow_bitmap_upload_count = 6; |
John Reck | df1742e | 2017-01-19 15:56:21 -0800 | [diff] [blame] | 77 | |
| 78 | // Number of "slow draw" events. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 79 | optional int32 slow_draw_count = 7; |
John Reck | 0e48647 | 2018-03-19 14:06:16 -0700 | [diff] [blame] | 80 | |
| 81 | // Number of frames that missed their deadline (aka, visibly janked) |
| 82 | optional int32 missed_deadline_count = 8; |
John Reck | df1742e | 2017-01-19 15:56:21 -0800 | [diff] [blame] | 83 | } |
| 84 | |
| 85 | message GraphicsStatsHistogramBucketProto { |
Kweku Adams | 1856a4c | 2018-04-03 16:31:10 -0700 | [diff] [blame] | 86 | option (android.msg_privacy).dest = DEST_AUTOMATIC; |
| 87 | |
John Reck | df1742e | 2017-01-19 15:56:21 -0800 | [diff] [blame] | 88 | // Lower bound of render time in milliseconds. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 89 | optional int32 render_millis = 1; |
John Reck | df1742e | 2017-01-19 15:56:21 -0800 | [diff] [blame] | 90 | // Number of frames in the bucket. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 91 | optional int32 frame_count = 2; |
John Reck | df1742e | 2017-01-19 15:56:21 -0800 | [diff] [blame] | 92 | } |