Home | History | Annotate | Download | only in timestatsproto
      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 
     17 syntax = "proto2";
     18 
     19 package android.surfaceflinger;
     20 
     21 option optimize_for = LITE_RUNTIME;
     22 
     23 message SFTimeStatsGlobalProto {
     24   // The start & end timestamps in UTC as
     25   // milliseconds since January 1, 1970
     26   optional int64 stats_start = 1;
     27   optional int64 stats_end = 2;
     28   // Total frames
     29   optional int32 total_frames = 3;
     30   // Total missed frames of SurfaceFlinger.
     31   optional int32 missed_frames = 4;
     32   // Total frames fallback to client composition.
     33   optional int32 client_composition_frames = 5;
     34 
     35   repeated SFTimeStatsLayerProto stats = 6;
     36 }
     37 
     38 message SFTimeStatsLayerProto {
     39   // The layer name
     40   optional string layer_name = 1;
     41   // The package name
     42   optional string package_name = 2;
     43   // The start & end timestamps in UTC as
     44   // milliseconds since January 1, 1970
     45   optional int64 stats_start = 3;
     46   optional int64 stats_end = 4;
     47   // Distinct frame count.
     48   optional int32 total_frames = 5;
     49 
     50   repeated SFTimeStatsDeltaProto deltas = 6;
     51 }
     52 
     53 message SFTimeStatsDeltaProto {
     54   // Name of the time interval
     55   optional string delta_name = 1;
     56   // Histogram of the delta time
     57   repeated SFTimeStatsHistogramBucketProto histograms = 2;
     58 }
     59 
     60 message SFTimeStatsHistogramBucketProto {
     61   // Lower bound of render time in milliseconds.
     62   optional int32 render_millis = 1;
     63   // Number of frames in the bucket.
     64   optional int32 frame_count = 2;
     65 }
     66