• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1syntax = "proto2";
2
3package perfetto.protos;
4
5import "protos/perfetto/metrics/metrics.proto";
6import "protos/perfetto/metrics/android/hwui_metric.proto";
7
8// Android HWUI graphics performance and graphics memory usage metrics augmented with
9// perf data which is specific to the Skottie player. Skottie app has an additional
10// render thread named "SkottieAnimator" in the traces. Perf metrics are filtered for
11// 'org.skia.skottie' process only.
12message ProcessRenderInfoEx {
13  //  original HWUI metric as defined by built-in perfetto proto.
14  optional ProcessRenderInfo hwui_process_info = 1;
15
16  // Number of times the Skottie GL thread rendered a frame and max/min/avg time for Skottie GL
17  // renderer to finish rendering in
18  // in nanoseconds. These values have 0 value for lottie player, because it does it renders only
19  // in RenderThread.
20  optional uint32 skottie_animator_count = 2;
21  optional int64 skottie_animator_max = 3;
22  optional int64 skottie_animator_min = 4;
23  optional double skottie_animator_avg = 5;
24
25  optional uint32 dequeue_buffer_count = 6;
26  optional int64 dequeue_buffer_max = 7;
27  optional int64 dequeue_buffer_min = 8;
28  optional double dequeue_buffer_avg = 9;
29
30  // The following 2 fields are useful to compare render thread performance between Lottie and
31  // Skottie players.
32  // Skottie metric is a sum of the time on RenderThread and SkottieAnimator threads, while Lottie
33  // is only the time on RenderThread.
34  optional double render_time_avg = 10;  // draw_frame_avg + skottie_animator_avg
35
36  // "render_time_avg_no_dequeue" tries to compensate the time spent to wait for a new buffer.
37  // It equals draw_frame_avg + skottie_animator_avg - dequeue_buffer_avg.
38  optional double render_time_avg_no_dequeue = 11;
39
40  optional int64 ui_thread_cpu_time = 12;  // CPU time spent on UI thread in nanoseconds
41  optional int64 rt_thread_cpu_time = 13;  // CPU time spent on RenderThread in nanoseconds
42  optional int64 hwui_tasks_cpu_time = 14; // CPU time spent on hwuiTask0/1 threads in nanoseconds
43  optional int64 skottie_animator_cpu_time = 15;  // CPU time spent on SkottieAnimator in ns
44
45  optional int64 total_cpu_time = 16;  // Total CPU time in nanoseconds. Equals
46  // ui_thread_cpu_time + rt_thread_cpu_time + skottie_animator_cpu_time + hwui_tasks_cpu_time
47
48  optional int64 total_gpu_time = 17;  // GPU time spent to render all content in nanoseconds.
49
50  // This one number is the "ultimate" benchmark to compare airbnb lottie vs skottie player.
51  // performance. It is the total time for any rendering related work on CPU and GPU combined.
52  optional int64 total_time = 18;      // This is total_cpu_time + total_gpu_time in nanoseconds.
53
54  // time between setSurface and second DrawFrame tag.
55  optional int64 startup_time = 19;
56}
57
58message SkottieMetric {
59  repeated ProcessRenderInfoEx process_info = 1;
60}
61
62extend TraceMetrics {
63  optional SkottieMetric skottie_metric = 460;
64}
65