blob: b8f38c2cc5dcd9a157be47c0693dd1827077b4c1 [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 Zhang04c1e672018-08-24 15:07:28 -070023// //depot/google3/java/com/google/android/apps/graphics/stats/proto/
24// timestats.proto is based on this proto. Please only make valid protobuf
25// changes to these messages, and keep the other file in sync per Android
26// release. Please also do not include "option optimize_for = LITE_RUNTIME;" at
27// google3 side.
Yiwei Zhangeaeea062018-06-28 14:46:51 -070028
29// Next tag: 7
Yiwei Zhang0102ad22018-05-02 17:37:17 -070030message SFTimeStatsGlobalProto {
Yiwei Zhangeaeea062018-06-28 14:46:51 -070031 // The stats start time in UTC as seconds since January 1, 1970
Yiwei Zhang0102ad22018-05-02 17:37:17 -070032 optional int64 stats_start = 1;
Yiwei Zhangeaeea062018-06-28 14:46:51 -070033 // The stats end time in UTC as seconds since January 1, 1970
Yiwei Zhang0102ad22018-05-02 17:37:17 -070034 optional int64 stats_end = 2;
Yiwei Zhangeaeea062018-06-28 14:46:51 -070035 // Total number of frames presented during tracing period.
Yiwei Zhang0102ad22018-05-02 17:37:17 -070036 optional int32 total_frames = 3;
37 // Total missed frames of SurfaceFlinger.
38 optional int32 missed_frames = 4;
39 // Total frames fallback to client composition.
40 optional int32 client_composition_frames = 5;
Yiwei Zhangeaeea062018-06-28 14:46:51 -070041 // Stats per layer. Apps could have multiple layers.
Yiwei Zhang0102ad22018-05-02 17:37:17 -070042 repeated SFTimeStatsLayerProto stats = 6;
43}
44
Yiwei Zhangeaeea062018-06-28 14:46:51 -070045// Next tag: 8
Yiwei Zhang0102ad22018-05-02 17:37:17 -070046message SFTimeStatsLayerProto {
Yiwei Zhangeaeea062018-06-28 14:46:51 -070047 // The name of the visible view layer.
Yiwei Zhang0102ad22018-05-02 17:37:17 -070048 optional string layer_name = 1;
Yiwei Zhangeaeea062018-06-28 14:46:51 -070049 // The package name of the application owning this layer.
Yiwei Zhang0102ad22018-05-02 17:37:17 -070050 optional string package_name = 2;
Yiwei Zhangeaeea062018-06-28 14:46:51 -070051 // The stats start time in UTC as seconds since January 1, 1970
Yiwei Zhang0102ad22018-05-02 17:37:17 -070052 optional int64 stats_start = 3;
Yiwei Zhangeaeea062018-06-28 14:46:51 -070053 // The stats end time in UTC as seconds since January 1, 1970
Yiwei Zhang0102ad22018-05-02 17:37:17 -070054 optional int64 stats_end = 4;
Yiwei Zhangeaeea062018-06-28 14:46:51 -070055 // Total number of frames presented during tracing period.
Yiwei Zhang0102ad22018-05-02 17:37:17 -070056 optional int32 total_frames = 5;
Yiwei Zhangeaeea062018-06-28 14:46:51 -070057 // Total number of frames dropped by SurfaceFlinger.
58 optional int32 dropped_frames = 7;
59 // There are multiple timestamps tracked in SurfaceFlinger, and these are the
60 // histograms of deltas between different combinations of those timestamps.
Yiwei Zhang0102ad22018-05-02 17:37:17 -070061 repeated SFTimeStatsDeltaProto deltas = 6;
62}
63
Yiwei Zhangeaeea062018-06-28 14:46:51 -070064// Next tag: 3
Yiwei Zhang0102ad22018-05-02 17:37:17 -070065message SFTimeStatsDeltaProto {
66 // Name of the time interval
67 optional string delta_name = 1;
Yiwei Zhangeaeea062018-06-28 14:46:51 -070068 // Histogram of the delta time. There should be at most 85 buckets ranging
69 // from [0ms, 1ms) to [1000ms, infinity)
Yiwei Zhang0102ad22018-05-02 17:37:17 -070070 repeated SFTimeStatsHistogramBucketProto histograms = 2;
71}
72
Yiwei Zhangeaeea062018-06-28 14:46:51 -070073// Next tag: 3
Yiwei Zhang0102ad22018-05-02 17:37:17 -070074message SFTimeStatsHistogramBucketProto {
Yiwei Zhangeaeea062018-06-28 14:46:51 -070075 // Lower bound of time interval in milliseconds.
76 optional int32 time_millis = 1;
Yiwei Zhang0102ad22018-05-02 17:37:17 -070077 // Number of frames in the bucket.
78 optional int32 frame_count = 2;
79}