timestats.proto 3.6 KB

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