• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
21import "protos/perfetto/metrics/android/cpu_metric.proto";
22
23// These metrices collects various function and thread
24// usage within androd's codec framework. This can give an
25// idea about performance and cpu usage when using codec
26// framework
27message AndroidCodecMetrics {
28
29  // profile details in messages
30  message Detail {
31    // function thread
32    optional string thread_name = 1;
33    // total time
34    optional int64 total_cpu_ns = 2;
35    // CPU time ( time 'Running' on cpu)
36    optional int64 running_cpu_ns = 3;
37  }
38
39  // These are traces and could indicate framework queue latency
40  // buffer-packing, buffer-preprocess, buffer post-process
41  // latency etc. These metrics are monitored to track quality.
42  // Same message can come from different
43  // processes.
44  message CodecFunction {
45    // codec string
46    optional string codec_string = 1;
47    // process_name
48    optional string process_name = 2;
49    // details
50    optional Detail detail = 3;
51  }
52
53  // This message can indicate overall cpu
54  // utilization of codec framework threads.
55  message CpuUsage {
56    // name of process using codec framework
57    optional string process_name = 1;
58    // name of the codec thread
59    optional string thread_name = 2;
60    // was thread_cpu_us
61    reserved 3;
62    // total cpu usage of the codec thread
63    optional int64 thread_cpu_ns = 6;
64    // can be number of codec framework thread
65    optional uint32 num_threads = 4;
66    // core type data info used by codec thread
67    repeated AndroidCpuMetric.CoreTypeData core_data = 5;
68  }
69
70  repeated CpuUsage cpu_usage = 1;
71  repeated CodecFunction codec_function = 2;
72
73}
74