1/* 2 * Copyright (C) 2023 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 21// This metric computes how much time processes spend in UNINTERRUPTIBLE_SLEEP 22// state 23message ProcessStateDurations { 24 optional int64 total_dur = 2; 25 optional int64 uninterruptible_sleep_dur = 3; 26} 27 28message AndroidBootMetric { 29 optional ProcessStateDurations system_server_durations = 1; 30 optional ProcessStateDurations systemui_durations = 2; 31 optional ProcessStateDurations launcher_durations = 3; 32 optional ProcessStateDurations gms_durations = 4; 33 // Launcher related boot metrics 34 message LauncherBreakdown { 35 // reports cold start time of NexusLauncher 36 optional int64 cold_start_dur = 1; 37 } 38 optional LauncherBreakdown launcher_breakdown = 5; 39 40 message ProcessStartAggregation { 41 optional int64 total_start_sum = 1; 42 optional int64 num_of_processes = 2; 43 optional double average_start_time = 3; 44 } 45 message GarbageCollectionAggregation { 46 optional int64 total_gc_count = 1; 47 optional int64 num_of_processes_with_gc = 2; 48 optional int64 num_of_threads_with_gc = 3; 49 optional double avg_gc_duration = 4; 50 optional double avg_running_gc_duration = 5; 51 optional int64 full_gc_count = 6; 52 optional int64 collector_transition_gc_count = 7; 53 optional int64 young_gc_count = 8; 54 optional int64 native_alloc_gc_count = 9; 55 optional int64 explicit_gc_count = 10; 56 optional int64 alloc_gc_count = 11; 57 optional double mb_per_ms_of_gc = 12; 58 } 59 message OomAdjusterTransitionCounts { 60 // name of the item aggregated by. example: process_name, 61 // oom_adjuster_reason. 62 optional string name = 1; 63 // name of previous oom bucket. 64 optional string src_bucket = 2; 65 // name of oom bucket. 66 optional string dest_bucket = 3; 67 // count of transitions 68 optional int64 count = 4; 69 } 70 message OomAdjBucketDurationAggregation { 71 // name of the item aggregated by. example: process_name, 72 // oom_adjuster_reason 73 optional string name = 1; 74 // name of oom bucket. 75 optional string bucket = 2; 76 // Duration of the time in the bucket 77 optional int64 total_dur = 3; 78 } 79 message OomAdjDurationAggregation { 80 optional int64 min_oom_adj_dur = 1; 81 optional int64 max_oom_adj_dur = 2; 82 optional double avg_oom_adj_dur = 3; 83 optional int64 oom_adj_event_count = 4; 84 optional string oom_adj_reason = 5; 85 } 86 message BroadcastCountAggregation { 87 optional string name = 1; 88 optional int64 count = 2; 89 } 90 // Stats for Broadcasts aggregated with duration. 91 message BroadcastDurationAggregation { 92 optional string name = 1; 93 optional double avg_duration = 2; 94 optional int64 max_duration = 3; 95 optional int64 sum_duration = 4; 96} 97 optional ProcessStartAggregation full_trace_process_start_aggregation = 6; 98 optional ProcessStartAggregation post_boot_process_start_aggregation = 7; 99 optional GarbageCollectionAggregation full_trace_gc_aggregation = 8; 100 optional GarbageCollectionAggregation post_boot_gc_aggregation = 9; 101 repeated OomAdjusterTransitionCounts 102 post_boot_oom_adjuster_transition_counts_global = 10; 103 repeated OomAdjusterTransitionCounts 104 post_boot_oom_adjuster_transition_counts_by_process = 11; 105 repeated OomAdjusterTransitionCounts 106 post_boot_oom_adjuster_transition_counts_by_oom_adj_reason = 12; 107 repeated OomAdjBucketDurationAggregation 108 post_boot_oom_adj_bucket_duration_agg_global = 13; 109 repeated OomAdjBucketDurationAggregation 110 post_boot_oom_adj_bucket_duration_agg_by_process = 14; 111 repeated OomAdjDurationAggregation post_boot_oom_adj_duration_agg = 15; 112 repeated BroadcastCountAggregation post_boot_broadcast_process_count_by_intent = 16; 113 repeated BroadcastCountAggregation post_boot_broadcast_count_by_process = 17; 114 repeated BroadcastDurationAggregation post_boot_brodcast_duration_agg_by_intent = 18; 115 repeated BroadcastDurationAggregation post_boot_brodcast_duration_agg_by_process = 19; 116 117} 118