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 AndroidDvfsMetric { 22 23 message BandStat { 24 // Operating frequency 25 optional int32 freq_value = 1; 26 27 // Percentage of duration in this operating frequency compared to all frequencies 28 optional double percentage = 2; 29 30 // Total duration in ns when the state was in this operating frequency 31 optional int64 duration_ns = 3; 32 } 33 34 message FrequencyResidency { 35 // Frequency representative name 36 optional string freq_name = 1; 37 // Each band statistics meta 38 repeated BandStat band_stat = 2; 39 } 40 41 // Frequency residency metrics from clock_set_rate ftrace event. 42 repeated FrequencyResidency freq_residencies = 1; 43} 44