1/* 2 * Copyright (C) 2022 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 21import "protos/perfetto/metrics/android/process_metadata.proto"; 22 23message AndroidFrameTimelineMetric { 24 message JankTypeMetric { 25 // The jank type 26 optional string type = 1; 27 28 // The count of frames with this jank type 29 optional int64 total_count = 2; 30 31 // The count of frames with this jank type and present type = PRESENT_UNSPECIFIED 32 optional int64 present_unspecified_count = 3; 33 34 // The count of frames with this jank type and present type = PRESENT_ON_TIME 35 optional int64 present_on_time_count = 4; 36 37 // The count of frames with this jank type and present type = PRESENT_LATE 38 optional int64 present_late_count = 5; 39 40 // The count of frames with this jank type and present type = PRESENT_EARLY 41 optional int64 present_early_count = 6; 42 43 // The count of frames with this jank type and present type = PRESENT_DROPPED 44 optional int64 present_dropped_count = 7; 45 46 // The count of frames with this jank type and present type = PRESENT_UNKNOWN 47 optional int64 present_unknown_count = 8; 48 } 49 50 message ProcessBreakdown { 51 optional AndroidProcessMetadata process = 3; 52 53 optional int64 total_frames = 4; 54 optional int64 missed_frames = 5; 55 optional int64 missed_app_frames = 6; 56 optional int64 missed_sf_frames = 7; 57 58 optional int64 frame_dur_max = 8; 59 optional int64 frame_dur_avg = 9; 60 optional int64 frame_dur_p50 = 10; 61 optional int64 frame_dur_p90 = 11; 62 optional int64 frame_dur_p95 = 12; 63 optional int64 frame_dur_p99 = 13; 64 optional double frame_dur_ms_p50 = 14; 65 optional double frame_dur_ms_p90 = 15; 66 optional double frame_dur_ms_p95 = 16; 67 optional double frame_dur_ms_p99 = 17; 68 optional int64 dropped_frames = 18; 69 70 // Metrics for each jank type in this process 71 repeated JankTypeMetric jank_types = 19; 72 73 reserved 1, 2; 74 } 75 76 optional int64 total_frames = 4; 77 optional int64 missed_app_frames = 5; 78 optional int64 dropped_frames = 6; 79 80 repeated ProcessBreakdown process = 2; 81 82 // Metrics for each jank type globally 83 repeated JankTypeMetric jank_types = 7; 84 85 reserved 1; 86} 87 88