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 21import "protos/perfetto/metrics/android/process_metadata.proto"; 22 23message AndroidThreadTimeInStateMetric { 24 message MetricsByCoreType { 25 optional int32 time_in_state_cpu = 5; 26 optional string core_type = 1; 27 28 optional int64 runtime_ms = 2; 29 // CPU megacycles (i.e. cycles divided by 1e6). 30 optional int64 mcycles = 3; 31 // Power cost as predicted by the power profile. 32 optional double power_profile_mah = 4; 33 } 34 35 message Thread { 36 optional string name = 1; 37 optional bool main_thread = 3; 38 repeated MetricsByCoreType metrics_by_core_type = 2; 39 } 40 41 message Process { 42 optional AndroidProcessMetadata metadata = 1; 43 repeated MetricsByCoreType metrics_by_core_type = 2; 44 repeated Thread threads = 3; 45 } 46 47 repeated Process processes = 1; 48} 49