• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
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
23// //depot/google3/wireless/android/graphics/surfaceflingerstats/proto/
24// timestats.proto is based on this proto. Please only make valid protobuf
25// changes to these messages, and keep google3 side proto messages in sync if
26// the end to end pipeline needs to be updated.
27
28// Next tag: 12
29message SFTimeStatsGlobalProto {
30  // The stats start time in UTC as seconds since January 1, 1970
31  optional int64 stats_start = 1;
32  // The stats end time in UTC as seconds since January 1, 1970
33  optional int64 stats_end = 2;
34  // Total number of frames presented during tracing period.
35  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;
40  // Primary display on time in milliseconds.
41  optional int64 display_on_time = 7;
42  // Stats per display configuration.
43  repeated SFTimeStatsDisplayConfigBucketProto display_config_stats = 9;
44  // Present to present histogram.
45  repeated SFTimeStatsHistogramBucketProto present_to_present = 8;
46  // Frame CPU duration histogram.
47  repeated SFTimeStatsHistogramBucketProto frame_duration = 10;
48  // Frame GPU duration histogram.
49  repeated SFTimeStatsHistogramBucketProto render_engine_timing = 11;
50  // Stats per layer. Apps could have multiple layers.
51  repeated SFTimeStatsLayerProto stats = 6;
52}
53
54// Next tag: 8
55message SFTimeStatsLayerProto {
56  // The name of the visible view layer.
57  optional string layer_name = 1;
58  // The package name of the application owning this layer.
59  optional string package_name = 2;
60  // The stats start time in UTC as seconds since January 1, 1970
61  optional int64 stats_start = 3;
62  // The stats end time in UTC as seconds since January 1, 1970
63  optional int64 stats_end = 4;
64  // Total number of frames presented during tracing period.
65  optional int32 total_frames = 5;
66  // Total number of frames dropped by SurfaceFlinger.
67  optional int32 dropped_frames = 7;
68  // There are multiple timestamps tracked in SurfaceFlinger, and these are the
69  // histograms of deltas between different combinations of those timestamps.
70  repeated SFTimeStatsDeltaProto deltas = 6;
71}
72
73// Next tag: 3
74message SFTimeStatsDeltaProto {
75  // Name of the time interval
76  optional string delta_name = 1;
77  // Histogram of the delta time. There should be at most 85 buckets ranging
78  // from [0ms, 1ms) to [1000ms, infinity)
79  repeated SFTimeStatsHistogramBucketProto histograms = 2;
80}
81
82// Next tag: 3
83message SFTimeStatsHistogramBucketProto {
84  // Lower bound of time interval in milliseconds.
85  optional int32 time_millis = 1;
86  // Number of frames in the bucket.
87  optional int32 frame_count = 2;
88}
89
90// Next tag: 3
91message SFTimeStatsDisplayConfigBucketProto {
92    // Metadata desribing a display config.
93    optional SFTimeStatsDisplayConfigProto config = 1;
94    // Duration in milliseconds for how long the display was in this
95    // configuration.
96    optional int64 duration_millis = 2;
97}
98
99// Next tag: 2
100message SFTimeStatsDisplayConfigProto {
101    // Frames per second, rounded to the nearest integer.
102    optional int32 fps = 1;
103}
104