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 17syntax = "proto2"; 18 19package android.uirenderer.protos; 20 21option optimize_for = LITE_RUNTIME; 22 23// frameworks/base/core/proto/android/service/graphicsstats.proto is based on 24// this proto. Please only make valid protobuf changes to these messages, and 25// keep the other file in sync with this one. 26 27message GraphicsStatsServiceDumpProto { 28 repeated GraphicsStatsProto stats = 1; 29} 30 31message GraphicsStatsProto { 32 // The package name of the app 33 optional string package_name = 1; 34 35 // The version code of the app 36 optional int64 version_code = 2; 37 38 // The start & end timestamps in UTC as 39 // milliseconds since January 1, 1970 40 // Compatible with java.util.Date#setTime() 41 optional int64 stats_start = 3; 42 optional int64 stats_end = 4; 43 44 // The aggregated statistics for the package 45 optional GraphicsStatsJankSummaryProto summary = 5; 46 47 // The frame time histogram for the package 48 repeated GraphicsStatsHistogramBucketProto histogram = 6; 49} 50 51message GraphicsStatsJankSummaryProto { 52 // Distinct frame count. 53 optional int32 total_frames = 1; 54 55 // Number of frames with slow render time. Frames are considered janky if 56 // they took more than a vsync interval (typically 16.667ms) to be rendered. 57 optional int32 janky_frames = 2; 58 59 // Number of "missed vsync" events. 60 optional int32 missed_vsync_count = 3; 61 62 // Number of frames in triple-buffering scenario (high input latency) 63 optional int32 high_input_latency_count = 4; 64 65 // Number of "slow UI thread" events. 66 optional int32 slow_ui_thread_count = 5; 67 68 // Number of "slow bitmap upload" events. 69 optional int32 slow_bitmap_upload_count = 6; 70 71 // Number of "slow draw" events. 72 optional int32 slow_draw_count = 7; 73 74 // Number of frames that missed their deadline (aka, visibly janked) 75 optional int32 missed_deadline_count = 8; 76} 77 78message GraphicsStatsHistogramBucketProto { 79 // Lower bound of render time in milliseconds. 80 optional int32 render_millis = 1; 81 // Number of frames in the bucket. 82 optional int32 frame_count = 2; 83} 84