1/* 2 * Copyright (C) 2020 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 perfetto.protos; 20 21message AndroidSurfaceflingerMetric { 22 // Counts the number of missed frames in the trace. 23 optional uint32 missed_frames = 1; 24 25 // Counts the number of missed HWC frames in the trace. 26 optional uint32 missed_hwc_frames = 2; 27 28 // Counts the number of missed GPU frames in the trace. 29 optional uint32 missed_gpu_frames = 3; 30 31 // Calculate the number of missed frames divided by 32 // total frames 33 optional double missed_frame_rate = 4; 34 35 // Calculate the number of missed HWC frames divided by 36 // total HWC frames 37 optional double missed_hwc_frame_rate = 5; 38 39 // Calculate the number of missed GPU frames divided by 40 // total GPU frames 41 optional double missed_gpu_frame_rate = 6; 42 43 // Count the number of times SurfaceFlinger needs to invoke GPU 44 // for rendering some layers 45 optional uint32 gpu_invocations = 7; 46 47 // Calculate the average duration of GPU request by SurfaceFlinger 48 // since it enters the FenceMonitor's queue until it gets completed 49 optional double avg_gpu_waiting_dur_ms = 8; 50 51 // Calculate the total duration when there is at least one GPU request 52 // by SurfaceFlinger that is still waiting for GPU to complete the 53 // request. 54 // This also equals to the total duration of 55 // "waiting for GPU completion <fence_num>" in SurfaceFlinger. 56 optional double total_non_empty_gpu_waiting_dur_ms = 9; 57 58 message MetricsPerDisplay { 59 // Display ID in SF 60 optional string display_id = 1; 61 62 // Counts the number of missed frames in the trace. 63 optional uint32 missed_frames = 2; 64 65 // Counts the number of missed HWC frames in the trace. 66 optional uint32 missed_hwc_frames = 3; 67 68 // Counts the number of missed GPU frames in the trace. 69 optional uint32 missed_gpu_frames = 4; 70 71 // Calculate the number of missed frames divided by 72 // total frames 73 optional double missed_frame_rate = 5; 74 75 // Calculate the number of missed HWC frames divided by 76 // total HWC frames 77 optional double missed_hwc_frame_rate = 6; 78 79 // Calculate the number of missed GPU frames divided by 80 // total GPU frames 81 optional double missed_gpu_frame_rate = 7; 82 } 83 84 repeated MetricsPerDisplay metrics_per_display = 10; 85} 86