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"; 18package android.service; 19 20option java_multiple_files = true; 21option java_outer_classname = "GraphicsStatsServiceProto"; 22 23import "frameworks/base/core/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 28message GraphicsStatsServiceDumpProto { 29 option (android.msg_privacy).dest = DEST_AUTOMATIC; 30 31 repeated GraphicsStatsProto stats = 1; 32} 33 34message GraphicsStatsProto { 35 option (android.msg_privacy).dest = DEST_AUTOMATIC; 36 37 // The package name of the app 38 optional string package_name = 1; 39 40 // The version code of the app 41 optional int64 version_code = 2; 42 43 // The start & end timestamps in UTC as 44 // milliseconds since January 1, 1970 45 // Compatible with java.util.Date#setTime() 46 optional int64 stats_start = 3; 47 optional int64 stats_end = 4; 48 49 // The aggregated statistics for the package. 50 optional GraphicsStatsJankSummaryProto summary = 5; 51 52 // The frame time histogram for the package. 53 repeated GraphicsStatsHistogramBucketProto histogram = 6; 54} 55 56message GraphicsStatsJankSummaryProto { 57 option (android.msg_privacy).dest = DEST_AUTOMATIC; 58 59 // Distinct frame count. 60 optional int32 total_frames = 1; 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. 64 optional int32 janky_frames = 2; 65 66 // Number of "missed vsync" events. 67 optional int32 missed_vsync_count = 3; 68 69 // Number of frames in triple-buffering scenario (high input latency) 70 optional int32 high_input_latency_count = 4; 71 72 // Number of "slow UI thread" events. 73 optional int32 slow_ui_thread_count = 5; 74 75 // Number of "slow bitmap upload" events. 76 optional int32 slow_bitmap_upload_count = 6; 77 78 // Number of "slow draw" events. 79 optional int32 slow_draw_count = 7; 80 81 // Number of frames that missed their deadline (aka, visibly janked) 82 optional int32 missed_deadline_count = 8; 83} 84 85message GraphicsStatsHistogramBucketProto { 86 option (android.msg_privacy).dest = DEST_AUTOMATIC; 87 88 // Lower bound of render time in milliseconds. 89 optional int32 render_millis = 1; 90 // Number of frames in the bucket. 91 optional int32 frame_count = 2; 92} 93