blob: 0dacbebbff755e250a1d19dbe081a9ab78885ce4 [file] [log] [blame]
Yiwei Zhang0102ad22018-05-02 17:37:17 -07001/*
2 * Copyright 2018 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 android.surfaceflinger;
20
21option optimize_for = LITE_RUNTIME;
22
Yiwei Zhang3a226d22018-10-16 09:23:03 -070023// //depot/google3/wireless/android/graphics/surfaceflingerstats/proto/
Yiwei Zhang04c1e672018-08-24 15:07:28 -070024// timestats.proto is based on this proto. Please only make valid protobuf
Yiwei Zhang3a226d22018-10-16 09:23:03 -070025// changes to these messages, and keep google3 side proto messages in sync if
26// the end to end pipeline needs to be updated.
Yiwei Zhangeaeea062018-06-28 14:46:51 -070027
Alec Mourifb571ea2019-01-24 18:42:10 -080028// Next tag: 10
Yiwei Zhang0102ad22018-05-02 17:37:17 -070029message SFTimeStatsGlobalProto {
Yiwei Zhangeaeea062018-06-28 14:46:51 -070030 // The stats start time in UTC as seconds since January 1, 1970
Yiwei Zhang0102ad22018-05-02 17:37:17 -070031 optional int64 stats_start = 1;
Yiwei Zhangeaeea062018-06-28 14:46:51 -070032 // The stats end time in UTC as seconds since January 1, 1970
Yiwei Zhang0102ad22018-05-02 17:37:17 -070033 optional int64 stats_end = 2;
Yiwei Zhangeaeea062018-06-28 14:46:51 -070034 // Total number of frames presented during tracing period.
Yiwei Zhang0102ad22018-05-02 17:37:17 -070035 optional int32 total_frames = 3;
36 // Total missed frames of SurfaceFlinger.
37 optional int32 missed_frames = 4;
38 // Total frames fallback to client composition.
39 optional int32 client_composition_frames = 5;
Yiwei Zhang3a226d22018-10-16 09:23:03 -070040 // Primary display on time in milliseconds.
41 optional int64 display_on_time = 7;
Alec Mourifb571ea2019-01-24 18:42:10 -080042 // Stats per display configuration.
43 repeated SFTimeStatsDisplayConfigBucketProto display_config_stats = 9;
Yiwei Zhangce6ebc02018-10-20 12:42:38 -070044 // Present to present histogram.
45 repeated SFTimeStatsHistogramBucketProto present_to_present = 8;
Yiwei Zhangeaeea062018-06-28 14:46:51 -070046 // Stats per layer. Apps could have multiple layers.
Yiwei Zhang0102ad22018-05-02 17:37:17 -070047 repeated SFTimeStatsLayerProto stats = 6;
48}
49
Yiwei Zhangeaeea062018-06-28 14:46:51 -070050// Next tag: 8
Yiwei Zhang0102ad22018-05-02 17:37:17 -070051message SFTimeStatsLayerProto {
Yiwei Zhangeaeea062018-06-28 14:46:51 -070052 // The name of the visible view layer.
Yiwei Zhang0102ad22018-05-02 17:37:17 -070053 optional string layer_name = 1;
Yiwei Zhangeaeea062018-06-28 14:46:51 -070054 // The package name of the application owning this layer.
Yiwei Zhang0102ad22018-05-02 17:37:17 -070055 optional string package_name = 2;
Yiwei Zhangeaeea062018-06-28 14:46:51 -070056 // The stats start time in UTC as seconds since January 1, 1970
Yiwei Zhang0102ad22018-05-02 17:37:17 -070057 optional int64 stats_start = 3;
Yiwei Zhangeaeea062018-06-28 14:46:51 -070058 // The stats end time in UTC as seconds since January 1, 1970
Yiwei Zhang0102ad22018-05-02 17:37:17 -070059 optional int64 stats_end = 4;
Yiwei Zhangeaeea062018-06-28 14:46:51 -070060 // Total number of frames presented during tracing period.
Yiwei Zhang0102ad22018-05-02 17:37:17 -070061 optional int32 total_frames = 5;
Yiwei Zhangeaeea062018-06-28 14:46:51 -070062 // Total number of frames dropped by SurfaceFlinger.
63 optional int32 dropped_frames = 7;
64 // There are multiple timestamps tracked in SurfaceFlinger, and these are the
65 // histograms of deltas between different combinations of those timestamps.
Yiwei Zhang0102ad22018-05-02 17:37:17 -070066 repeated SFTimeStatsDeltaProto deltas = 6;
67}
68
Yiwei Zhangeaeea062018-06-28 14:46:51 -070069// Next tag: 3
Yiwei Zhang0102ad22018-05-02 17:37:17 -070070message SFTimeStatsDeltaProto {
71 // Name of the time interval
72 optional string delta_name = 1;
Yiwei Zhangeaeea062018-06-28 14:46:51 -070073 // Histogram of the delta time. There should be at most 85 buckets ranging
74 // from [0ms, 1ms) to [1000ms, infinity)
Yiwei Zhang0102ad22018-05-02 17:37:17 -070075 repeated SFTimeStatsHistogramBucketProto histograms = 2;
76}
77
Yiwei Zhangeaeea062018-06-28 14:46:51 -070078// Next tag: 3
Yiwei Zhang0102ad22018-05-02 17:37:17 -070079message SFTimeStatsHistogramBucketProto {
Yiwei Zhangeaeea062018-06-28 14:46:51 -070080 // Lower bound of time interval in milliseconds.
81 optional int32 time_millis = 1;
Yiwei Zhang0102ad22018-05-02 17:37:17 -070082 // Number of frames in the bucket.
83 optional int32 frame_count = 2;
84}
Alec Mourifb571ea2019-01-24 18:42:10 -080085
86// Next tag: 3
87message SFTimeStatsDisplayConfigBucketProto {
88 // Metadata desribing a display config.
89 optional SFTimeStatsDisplayConfigProto config = 1;
90 // Duration in milliseconds for how long the display was in this
91 // configuration.
92 optional int64 duration_millis = 2;
93}
94
95// Next tag: 2
96message SFTimeStatsDisplayConfigProto {
97 // Frames per second, rounded to the nearest integer.
98 optional int32 fps = 1;
99}