blob: c2fedf5a57223d3494ef60948ab110991ee0261b [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
23message GraphicsStatsServiceDumpProto {
24 repeated GraphicsStatsProto stats = 1;
25}
26
27message GraphicsStatsProto {
28
29 // The package name of the app
Yi Jinc7f93072017-09-29 15:29:38 -070030 optional string package_name = 1;
John Reckdf1742e2017-01-19 15:56:21 -080031
32 // The version code of the app
Dianne Hackborn73453e42017-12-11 16:30:36 -080033 optional int64 version_code = 2;
John Reckdf1742e2017-01-19 15:56:21 -080034
35 // The start & end timestamps in UTC as
36 // milliseconds since January 1, 1970
37 // Compatible with java.util.Date#setTime()
Yi Jinc7f93072017-09-29 15:29:38 -070038 optional int64 stats_start = 3;
39 optional int64 stats_end = 4;
John Reckdf1742e2017-01-19 15:56:21 -080040
41 // The aggregated statistics for the package
Yi Jinc7f93072017-09-29 15:29:38 -070042 optional GraphicsStatsJankSummaryProto summary = 5;
John Reckdf1742e2017-01-19 15:56:21 -080043
44 // The frame time histogram for the package
45 repeated GraphicsStatsHistogramBucketProto histogram = 6;
46}
47
48message GraphicsStatsJankSummaryProto {
49 // Distinct frame count.
Yi Jinc7f93072017-09-29 15:29:38 -070050 optional int32 total_frames = 1;
John Reckdf1742e2017-01-19 15:56:21 -080051
52 // Number of frames with slow render time. Frames are considered janky if
53 // they took more than a vsync interval (typically 16.667ms) to be rendered.
Yi Jinc7f93072017-09-29 15:29:38 -070054 optional int32 janky_frames = 2;
John Reckdf1742e2017-01-19 15:56:21 -080055
56 // Number of "missed vsync" events.
Yi Jinc7f93072017-09-29 15:29:38 -070057 optional int32 missed_vsync_count = 3;
John Reckdf1742e2017-01-19 15:56:21 -080058
John Reck0e486472018-03-19 14:06:16 -070059 // Number of frames in triple-buffering scenario (high input latency)
Yi Jinc7f93072017-09-29 15:29:38 -070060 optional int32 high_input_latency_count = 4;
John Reckdf1742e2017-01-19 15:56:21 -080061
62 // Number of "slow UI thread" events.
Yi Jinc7f93072017-09-29 15:29:38 -070063 optional int32 slow_ui_thread_count = 5;
John Reckdf1742e2017-01-19 15:56:21 -080064
65 // Number of "slow bitmap upload" events.
Yi Jinc7f93072017-09-29 15:29:38 -070066 optional int32 slow_bitmap_upload_count = 6;
John Reckdf1742e2017-01-19 15:56:21 -080067
68 // Number of "slow draw" events.
Yi Jinc7f93072017-09-29 15:29:38 -070069 optional int32 slow_draw_count = 7;
John Reck0e486472018-03-19 14:06:16 -070070
71 // Number of frames that missed their deadline (aka, visibly janked)
72 optional int32 missed_deadline_count = 8;
John Reckdf1742e2017-01-19 15:56:21 -080073}
74
75message GraphicsStatsHistogramBucketProto {
76 // Lower bound of render time in milliseconds.
Yi Jinc7f93072017-09-29 15:29:38 -070077 optional int32 render_millis = 1;
John Reckdf1742e2017-01-19 15:56:21 -080078 // Number of frames in the bucket.
Yi Jinc7f93072017-09-29 15:29:38 -070079 optional int32 frame_count = 2;
John Reckdf1742e2017-01-19 15:56:21 -080080}