blob: a8f6fa8ab196eeb39c34d50b3163eb61d69ae7ea [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
23// frameworks/base/core/proto/android/service/sftimestats.proto is based on
24// this proto. Please only make valid protobuf changes to these messages, and
25// keep the other file in sync with this one.
26
27message SFTimeStatsGlobalProto {
28 // The start & end timestamps in UTC as
29 // milliseconds since January 1, 1970
30 optional int64 stats_start = 1;
31 optional int64 stats_end = 2;
32 // Total frames
33 optional int32 total_frames = 3;
34 // Total missed frames of SurfaceFlinger.
35 optional int32 missed_frames = 4;
36 // Total frames fallback to client composition.
37 optional int32 client_composition_frames = 5;
38
39 repeated SFTimeStatsLayerProto stats = 6;
40}
41
42message SFTimeStatsLayerProto {
43 // The layer name
44 optional string layer_name = 1;
45 // The package name
46 optional string package_name = 2;
47 // The start & end timestamps in UTC as
48 // milliseconds since January 1, 1970
49 optional int64 stats_start = 3;
50 optional int64 stats_end = 4;
51 // Distinct frame count.
52 optional int32 total_frames = 5;
53
54 repeated SFTimeStatsDeltaProto deltas = 6;
55}
56
57message SFTimeStatsDeltaProto {
58 // Name of the time interval
59 optional string delta_name = 1;
60 // Histogram of the delta time
61 repeated SFTimeStatsHistogramBucketProto histograms = 2;
62}
63
64message SFTimeStatsHistogramBucketProto {
65 // Lower bound of render time in milliseconds.
66 optional int32 render_millis = 1;
67 // Number of frames in the bucket.
68 optional int32 frame_count = 2;
69}