Yiwei Zhang | 0102ad2 | 2018-05-02 17:37:17 -0700 | [diff] [blame] | 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 | |
Yiwei Zhang | 3a226d2 | 2018-10-16 09:23:03 -0700 | [diff] [blame^] | 23 | // //depot/google3/wireless/android/graphics/surfaceflingerstats/proto/ |
Yiwei Zhang | 04c1e67 | 2018-08-24 15:07:28 -0700 | [diff] [blame] | 24 | // timestats.proto is based on this proto. Please only make valid protobuf |
Yiwei Zhang | 3a226d2 | 2018-10-16 09:23:03 -0700 | [diff] [blame^] | 25 | // changes to these messages, and keep google3 side proto messages in sync if |
| 26 | // the end to end pipeline needs to be updated. |
Yiwei Zhang | eaeea06 | 2018-06-28 14:46:51 -0700 | [diff] [blame] | 27 | |
Yiwei Zhang | 3a226d2 | 2018-10-16 09:23:03 -0700 | [diff] [blame^] | 28 | // Next tag: 8 |
Yiwei Zhang | 0102ad2 | 2018-05-02 17:37:17 -0700 | [diff] [blame] | 29 | message SFTimeStatsGlobalProto { |
Yiwei Zhang | eaeea06 | 2018-06-28 14:46:51 -0700 | [diff] [blame] | 30 | // The stats start time in UTC as seconds since January 1, 1970 |
Yiwei Zhang | 0102ad2 | 2018-05-02 17:37:17 -0700 | [diff] [blame] | 31 | optional int64 stats_start = 1; |
Yiwei Zhang | eaeea06 | 2018-06-28 14:46:51 -0700 | [diff] [blame] | 32 | // The stats end time in UTC as seconds since January 1, 1970 |
Yiwei Zhang | 0102ad2 | 2018-05-02 17:37:17 -0700 | [diff] [blame] | 33 | optional int64 stats_end = 2; |
Yiwei Zhang | eaeea06 | 2018-06-28 14:46:51 -0700 | [diff] [blame] | 34 | // Total number of frames presented during tracing period. |
Yiwei Zhang | 0102ad2 | 2018-05-02 17:37:17 -0700 | [diff] [blame] | 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; |
Yiwei Zhang | 3a226d2 | 2018-10-16 09:23:03 -0700 | [diff] [blame^] | 40 | // Primary display on time in milliseconds. |
| 41 | optional int64 display_on_time = 7; |
Yiwei Zhang | eaeea06 | 2018-06-28 14:46:51 -0700 | [diff] [blame] | 42 | // Stats per layer. Apps could have multiple layers. |
Yiwei Zhang | 0102ad2 | 2018-05-02 17:37:17 -0700 | [diff] [blame] | 43 | repeated SFTimeStatsLayerProto stats = 6; |
| 44 | } |
| 45 | |
Yiwei Zhang | eaeea06 | 2018-06-28 14:46:51 -0700 | [diff] [blame] | 46 | // Next tag: 8 |
Yiwei Zhang | 0102ad2 | 2018-05-02 17:37:17 -0700 | [diff] [blame] | 47 | message SFTimeStatsLayerProto { |
Yiwei Zhang | eaeea06 | 2018-06-28 14:46:51 -0700 | [diff] [blame] | 48 | // The name of the visible view layer. |
Yiwei Zhang | 0102ad2 | 2018-05-02 17:37:17 -0700 | [diff] [blame] | 49 | optional string layer_name = 1; |
Yiwei Zhang | eaeea06 | 2018-06-28 14:46:51 -0700 | [diff] [blame] | 50 | // The package name of the application owning this layer. |
Yiwei Zhang | 0102ad2 | 2018-05-02 17:37:17 -0700 | [diff] [blame] | 51 | optional string package_name = 2; |
Yiwei Zhang | eaeea06 | 2018-06-28 14:46:51 -0700 | [diff] [blame] | 52 | // The stats start time in UTC as seconds since January 1, 1970 |
Yiwei Zhang | 0102ad2 | 2018-05-02 17:37:17 -0700 | [diff] [blame] | 53 | optional int64 stats_start = 3; |
Yiwei Zhang | eaeea06 | 2018-06-28 14:46:51 -0700 | [diff] [blame] | 54 | // The stats end time in UTC as seconds since January 1, 1970 |
Yiwei Zhang | 0102ad2 | 2018-05-02 17:37:17 -0700 | [diff] [blame] | 55 | optional int64 stats_end = 4; |
Yiwei Zhang | eaeea06 | 2018-06-28 14:46:51 -0700 | [diff] [blame] | 56 | // Total number of frames presented during tracing period. |
Yiwei Zhang | 0102ad2 | 2018-05-02 17:37:17 -0700 | [diff] [blame] | 57 | optional int32 total_frames = 5; |
Yiwei Zhang | eaeea06 | 2018-06-28 14:46:51 -0700 | [diff] [blame] | 58 | // Total number of frames dropped by SurfaceFlinger. |
| 59 | optional int32 dropped_frames = 7; |
| 60 | // There are multiple timestamps tracked in SurfaceFlinger, and these are the |
| 61 | // histograms of deltas between different combinations of those timestamps. |
Yiwei Zhang | 0102ad2 | 2018-05-02 17:37:17 -0700 | [diff] [blame] | 62 | repeated SFTimeStatsDeltaProto deltas = 6; |
| 63 | } |
| 64 | |
Yiwei Zhang | eaeea06 | 2018-06-28 14:46:51 -0700 | [diff] [blame] | 65 | // Next tag: 3 |
Yiwei Zhang | 0102ad2 | 2018-05-02 17:37:17 -0700 | [diff] [blame] | 66 | message SFTimeStatsDeltaProto { |
| 67 | // Name of the time interval |
| 68 | optional string delta_name = 1; |
Yiwei Zhang | eaeea06 | 2018-06-28 14:46:51 -0700 | [diff] [blame] | 69 | // Histogram of the delta time. There should be at most 85 buckets ranging |
| 70 | // from [0ms, 1ms) to [1000ms, infinity) |
Yiwei Zhang | 0102ad2 | 2018-05-02 17:37:17 -0700 | [diff] [blame] | 71 | repeated SFTimeStatsHistogramBucketProto histograms = 2; |
| 72 | } |
| 73 | |
Yiwei Zhang | eaeea06 | 2018-06-28 14:46:51 -0700 | [diff] [blame] | 74 | // Next tag: 3 |
Yiwei Zhang | 0102ad2 | 2018-05-02 17:37:17 -0700 | [diff] [blame] | 75 | message SFTimeStatsHistogramBucketProto { |
Yiwei Zhang | eaeea06 | 2018-06-28 14:46:51 -0700 | [diff] [blame] | 76 | // Lower bound of time interval in milliseconds. |
| 77 | optional int32 time_millis = 1; |
Yiwei Zhang | 0102ad2 | 2018-05-02 17:37:17 -0700 | [diff] [blame] | 78 | // Number of frames in the bucket. |
| 79 | optional int32 frame_count = 2; |
| 80 | } |