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 enum PipelineType { 36 UNKNOWN = 0; 37 GL = 1; 38 VULKAN = 2; 39 } 40 option (android.msg_privacy).dest = DEST_AUTOMATIC; 41 42 // The package name of the app 43 optional string package_name = 1; 44 45 // The version code of the app 46 optional int64 version_code = 2; 47 48 // The start & end timestamps in UTC as 49 // milliseconds since January 1, 1970 50 // Compatible with java.util.Date#setTime() 51 optional int64 stats_start = 3; 52 optional int64 stats_end = 4; 53 54 // The aggregated statistics for the package. 55 optional GraphicsStatsJankSummaryProto summary = 5; 56 57 // The frame time histogram for the package. 58 repeated GraphicsStatsHistogramBucketProto histogram = 6; 59 60 // The gpu frame time histogram for the package 61 repeated GraphicsStatsHistogramBucketProto gpu_histogram = 7; 62 63 // HWUI renders pipeline type: GL or Vulkan 64 optional PipelineType pipeline = 8; 65 66 // The UID of the app 67 optional int32 uid = 9; 68} 69 70message GraphicsStatsJankSummaryProto { 71 option (android.msg_privacy).dest = DEST_AUTOMATIC; 72 73 // Distinct frame count. 74 optional int32 total_frames = 1; 75 76 // Number of frames with slow render time. Frames are considered janky if 77 // they took more than a vsync interval (typically 16.667ms) to be rendered. 78 optional int32 janky_frames = 2; 79 80 // Number of "missed vsync" events. 81 optional int32 missed_vsync_count = 3; 82 83 // Number of frames in triple-buffering scenario (high input latency) 84 optional int32 high_input_latency_count = 4; 85 86 // Number of "slow UI thread" events. 87 optional int32 slow_ui_thread_count = 5; 88 89 // Number of "slow bitmap upload" events. 90 optional int32 slow_bitmap_upload_count = 6; 91 92 // Number of "slow draw" events. 93 optional int32 slow_draw_count = 7; 94 95 // Number of frames that missed their deadline (aka, visibly janked) 96 optional int32 missed_deadline_count = 8; 97} 98 99message GraphicsStatsHistogramBucketProto { 100 option (android.msg_privacy).dest = DEST_AUTOMATIC; 101 102 // Lower bound of render time in milliseconds. 103 optional int32 render_millis = 1; 104 // Number of frames in the bucket. 105 optional int32 frame_count = 2; 106} 107