blob: d75f135be57355d34fb0ee7f1dd379b840d2e343 [file] [log] [blame]
John Reckdf1742e2017-01-19 15:56:21 -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";
John Reckdf1742e2017-01-19 15:56:21 -080018package android.service;
19
20option java_multiple_files = true;
21option java_outer_classname = "GraphicsStatsServiceProto";
John Reckdf1742e2017-01-19 15:56:21 -080022
Kweku Adams1856a4c2018-04-03 16:31:10 -070023import "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 Reckdf1742e2017-01-19 15:56:21 -080028message GraphicsStatsServiceDumpProto {
Kweku Adams1856a4c2018-04-03 16:31:10 -070029 option (android.msg_privacy).dest = DEST_AUTOMATIC;
30
John Reckdf1742e2017-01-19 15:56:21 -080031 repeated GraphicsStatsProto stats = 1;
32}
33
34message GraphicsStatsProto {
Kweku Adams1856a4c2018-04-03 16:31:10 -070035 option (android.msg_privacy).dest = DEST_AUTOMATIC;
John Reckdf1742e2017-01-19 15:56:21 -080036
37 // The package name of the app
Yi Jinc7f93072017-09-29 15:29:38 -070038 optional string package_name = 1;
John Reckdf1742e2017-01-19 15:56:21 -080039
40 // The version code of the app
Dianne Hackborn73453e42017-12-11 16:30:36 -080041 optional int64 version_code = 2;
John Reckdf1742e2017-01-19 15:56:21 -080042
43 // The start & end timestamps in UTC as
44 // milliseconds since January 1, 1970
45 // Compatible with java.util.Date#setTime()
Yi Jinc7f93072017-09-29 15:29:38 -070046 optional int64 stats_start = 3;
47 optional int64 stats_end = 4;
John Reckdf1742e2017-01-19 15:56:21 -080048
49 // The aggregated statistics for the package
Yi Jinc7f93072017-09-29 15:29:38 -070050 optional GraphicsStatsJankSummaryProto summary = 5;
John Reckdf1742e2017-01-19 15:56:21 -080051
52 // The frame time histogram for the package
53 repeated GraphicsStatsHistogramBucketProto histogram = 6;
54}
55
56message GraphicsStatsJankSummaryProto {
Kweku Adams1856a4c2018-04-03 16:31:10 -070057 option (android.msg_privacy).dest = DEST_AUTOMATIC;
58
John Reckdf1742e2017-01-19 15:56:21 -080059 // Distinct frame count.
Yi Jinc7f93072017-09-29 15:29:38 -070060 optional int32 total_frames = 1;
John Reckdf1742e2017-01-19 15:56:21 -080061
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 Jinc7f93072017-09-29 15:29:38 -070064 optional int32 janky_frames = 2;
John Reckdf1742e2017-01-19 15:56:21 -080065
66 // Number of "missed vsync" events.
Yi Jinc7f93072017-09-29 15:29:38 -070067 optional int32 missed_vsync_count = 3;
John Reckdf1742e2017-01-19 15:56:21 -080068
John Reck0e486472018-03-19 14:06:16 -070069 // Number of frames in triple-buffering scenario (high input latency)
Yi Jinc7f93072017-09-29 15:29:38 -070070 optional int32 high_input_latency_count = 4;
John Reckdf1742e2017-01-19 15:56:21 -080071
72 // Number of "slow UI thread" events.
Yi Jinc7f93072017-09-29 15:29:38 -070073 optional int32 slow_ui_thread_count = 5;
John Reckdf1742e2017-01-19 15:56:21 -080074
75 // Number of "slow bitmap upload" events.
Yi Jinc7f93072017-09-29 15:29:38 -070076 optional int32 slow_bitmap_upload_count = 6;
John Reckdf1742e2017-01-19 15:56:21 -080077
78 // Number of "slow draw" events.
Yi Jinc7f93072017-09-29 15:29:38 -070079 optional int32 slow_draw_count = 7;
John Reck0e486472018-03-19 14:06:16 -070080
81 // Number of frames that missed their deadline (aka, visibly janked)
82 optional int32 missed_deadline_count = 8;
John Reckdf1742e2017-01-19 15:56:21 -080083}
84
85message GraphicsStatsHistogramBucketProto {
Kweku Adams1856a4c2018-04-03 16:31:10 -070086 option (android.msg_privacy).dest = DEST_AUTOMATIC;
87
John Reckdf1742e2017-01-19 15:56:21 -080088 // Lower bound of render time in milliseconds.
Yi Jinc7f93072017-09-29 15:29:38 -070089 optional int32 render_millis = 1;
John Reckdf1742e2017-01-19 15:56:21 -080090 // Number of frames in the bucket.
Yi Jinc7f93072017-09-29 15:29:38 -070091 optional int32 frame_count = 2;
John Reckdf1742e2017-01-19 15:56:21 -080092}