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 17 syntax = "proto3"; 18 19 package android.service; 20 21 option java_multiple_files = true; 22 option java_outer_classname = "GraphicsStatsServiceProto"; 23 24 message GraphicsStatsServiceDumpProto { 25 repeated GraphicsStatsProto stats = 1; 26 } 27 28 message GraphicsStatsProto { 29 30 // The package name of the app 31 string package_name = 1; 32 33 // The version code of the app 34 int32 version_code = 2; 35 36 // The start & end timestamps in UTC as 37 // milliseconds since January 1, 1970 38 // Compatible with java.util.Date#setTime() 39 int64 stats_start = 3; 40 int64 stats_end = 4; 41 42 // The aggregated statistics for the package 43 GraphicsStatsJankSummaryProto summary = 5; 44 45 // The frame time histogram for the package 46 repeated GraphicsStatsHistogramBucketProto histogram = 6; 47 } 48 49 message GraphicsStatsJankSummaryProto { 50 // Distinct frame count. 51 int32 total_frames = 1; 52 53 // Number of frames with slow render time. Frames are considered janky if 54 // they took more than a vsync interval (typically 16.667ms) to be rendered. 55 int32 janky_frames = 2; 56 57 // Number of "missed vsync" events. 58 int32 missed_vsync_count = 3; 59 60 // Number of "high input latency" events. 61 int32 high_input_latency_count = 4; 62 63 // Number of "slow UI thread" events. 64 int32 slow_ui_thread_count = 5; 65 66 // Number of "slow bitmap upload" events. 67 int32 slow_bitmap_upload_count = 6; 68 69 // Number of "slow draw" events. 70 int32 slow_draw_count = 7; 71 } 72 73 message GraphicsStatsHistogramBucketProto { 74 // Lower bound of render time in milliseconds. 75 int32 render_millis = 1; 76 // Number of frames in the bucket. 77 int32 frame_count = 2; 78 } 79