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: 10 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 // Stats per layer. Apps could have multiple layers. 47 repeated SFTimeStatsLayerProto stats = 6; 48} 49 50// Next tag: 8 51message SFTimeStatsLayerProto { 52 // The name of the visible view layer. 53 optional string layer_name = 1; 54 // The package name of the application owning this layer. 55 optional string package_name = 2; 56 // The stats start time in UTC as seconds since January 1, 1970 57 optional int64 stats_start = 3; 58 // The stats end time in UTC as seconds since January 1, 1970 59 optional int64 stats_end = 4; 60 // Total number of frames presented during tracing period. 61 optional int32 total_frames = 5; 62 // 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. 66 repeated SFTimeStatsDeltaProto deltas = 6; 67} 68 69// Next tag: 3 70message SFTimeStatsDeltaProto { 71 // Name of the time interval 72 optional string delta_name = 1; 73 // Histogram of the delta time. There should be at most 85 buckets ranging 74 // from [0ms, 1ms) to [1000ms, infinity) 75 repeated SFTimeStatsHistogramBucketProto histograms = 2; 76} 77 78// Next tag: 3 79message SFTimeStatsHistogramBucketProto { 80 // Lower bound of time interval in milliseconds. 81 optional int32 time_millis = 1; 82 // Number of frames in the bucket. 83 optional int32 frame_count = 2; 84} 85 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} 100