• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2024 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 AndroidGarbageCollectionStats {
24  message ProcessStats {
25    // The process the stats are associated with.
26    optional AndroidProcessMetadata process = 1;
27    // Megabyte-seconds of heap size across the device, used in the calculation
28    // of heap_size_mb.
29    optional double heap_size_mbs = 2;
30    // Total size of heap allocations across the device on average, in MB.
31    optional double heap_size_mb = 3;
32    // Total number of bytes allocated over the course of the trace.
33    optional double heap_allocated_mb = 4;
34    // Overall rate of heap allocations in MB per second. This gives a sense of
35    // how much allocation activity is going on during the trace.
36    optional double heap_allocation_rate = 5;
37    // Megabyte-seconds of live heap for processes that had GC events.
38    optional double heap_live_mbs = 6;
39    // Megabyte-seconds of total heap for processes that had GC events.
40    optional double heap_total_mbs = 7;
41    // Overall heap utilization. This gives a sense of how aggressive GC is
42    // during this trace.
43    optional double heap_utilization = 8;
44    // CPU time spent running GC. Used in the calculation of gc_running_rate.
45    optional int64 gc_running_dur = 9;
46    // CPU time spent running GC, as a fraction of the duration of the trace.
47    // This gives a sense of the battery cost of GC.
48    optional double gc_running_rate = 10;
49    // A measure of how efficient GC is with respect to cpu, independent of how
50    // aggressively GC is tuned. Larger values indicate more efficient GC, so
51    // larger is better.
52    optional double gc_running_efficiency = 11;
53    // Time GC is running during app startup. Used in the calculation of
54    // gc_during_android_startup_rate.
55    optional int64 gc_during_android_startup_dur = 12;
56    // Time GC is running during app startup, as a fraction of startup time in
57    // the trace. This gives a sense of how much potential interference there
58    // is between GC and application startup.
59    optional double gc_during_android_startup_rate = 13;
60    // A measure of how efficient GC is with regards to gc during application
61    // startup, independent of how aggressively GC is tuned. Larger values
62    // indicate more efficient GC, so larger is better.
63    optional double gc_during_android_startup_efficiency = 14;
64  }
65
66  // The start of the window of time that the stats cover in the trace.
67  optional int64 ts = 1;
68  // The duration of the window of time that the stats cover in the trace.
69  optional int64 dur = 2;
70  // Megabyte-seconds of heap size across the device, used in the calculation
71  // of heap_size_mb.
72  optional double heap_size_mbs = 3;
73  // Total size of heap allocations across the device on average, in MB.
74  optional double heap_size_mb = 4;
75  // Total number of bytes allocated over the course of the trace.
76  optional double heap_allocated_mb = 5;
77  // Overall rate of heap allocations in MB per second. This gives a sense of
78  // how much allocation activity is going on during the trace.
79  optional double heap_allocation_rate = 6;
80  // Megabyte-seconds of live heap for processes that had GC events.
81  optional double heap_live_mbs = 7;
82  // Megabyte-seconds of total heap for processes that had GC events.
83  optional double heap_total_mbs = 8;
84  // Overall heap utilization. This gives a sense of how aggressive GC is
85  // during this trace.
86  optional double heap_utilization = 9;
87  // CPU time spent running GC. Used in the calculation of gc_running_rate.
88  optional int64 gc_running_dur = 10;
89  // CPU time spent running GC, as a fraction of the duration of the trace.
90  // This gives a sense of the battery cost of GC.
91  optional double gc_running_rate = 11;
92  // A measure of how efficient GC is with respect to cpu, independent of how
93  // aggressively GC is tuned. Larger values indicate more efficient GC, so
94  // larger is better.
95  optional double gc_running_efficiency = 12;
96  // Time GC is running during app startup. Used in the calculation of
97  // gc_during_android_startup_rate.
98  optional int64 gc_during_android_startup_dur = 13;
99  // Total startup time in the trace, used to normalize the
100  // gc_during_android_startup_rate.
101  optional int64 total_android_startup_dur = 14;
102  // Time GC is running during app startup, as a fraction of startup time in
103  // the trace. This gives a sense of how much potential interference there
104  // is between GC and application startup.
105  optional double gc_during_android_startup_rate = 15;
106  // A measure of how efficient GC is with regards to gc during application
107  // startup, independent of how aggressively GC is tuned. Larger values
108  // indicate more efficient GC, so larger is better.
109  optional double gc_during_android_startup_efficiency = 16;
110  // Per-process stats.
111  repeated ProcessStats processes = 17;
112}
113