Commit 9d6876b2 authored by nuwanda's avatar nuwanda Committed by Commit Bot

[tbmv3] Add rendering UMA metrics to TBMv3

Add TBMv3 metrics calculated based on histogram samples that are
traced when histogram_samples category is enabled.

See: https://chromium-review.googlesource.com/c/chromium/src/+/2363747

Bug: 1119834
Change-Id: I7bb2a33c5123eea0e85a7f8fdc3dd135922d30cb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2379832Reviewed-by: default avatarDeep Roy <dproy@google.com>
Reviewed-by: default avatarMikhail Khokhlov <khokhlov@google.com>
Commit-Queue: Julia Semavina <nuwanda@google.com>
Cr-Commit-Position: refs/heads/master@{#802818}
parent e2675a6d
// Copyright 2020 Google LLC.
// SPDX-License-Identifier: Apache-2.0
syntax = "proto2";
package perfetto.protos;
import "protos/perfetto/metrics/metrics.proto";
import "protos/perfetto/metrics/custom_options.proto";
message UMAMetrics {
repeated double compositing_display_draw_to_swap = 1
[(unit) = "ms_smallerIsBetter"];
repeated double compositor_latency_total_latency = 2
[(unit) = "ms_smallerIsBetter"];
repeated double
event_latency_scroll_begin_touch_time_to_scroll_update_swap_begin4 = 3
[(unit) = "ms_smallerIsBetter"];
repeated double
event_latency_scroll_update_touch_time_to_scroll_update_swap_begin4 = 4
[(unit) = "ms_smallerIsBetter"];
repeated double
event_latency_scroll_begin_wheel_time_to_scroll_update_swap_begin4 = 5
[(unit) = "ms_smallerIsBetter"];
repeated double
event_latency_scroll_update_wheel_time_to_scroll_update_swap_begin4 = 6
[(unit) = "ms_smallerIsBetter"];
repeated double graphics_smoothness_checkerboarding_compositor_animation = 7
[(unit) = "n%_smallerIsBetter"];
repeated double graphics_smoothness_checkerboarding_main_thread_animation = 8
[(unit) = "n%_smallerIsBetter"];
repeated double graphics_smoothness_checkerboarding_pinch_zoom = 9
[(unit) = "n%_smallerIsBetter"];
repeated double graphics_smoothness_checkerboarding_raf = 10
[(unit) = "n%_smallerIsBetter"];
repeated double graphics_smoothness_checkerboarding_touch_scroll = 11
[(unit) = "n%_smallerIsBetter"];
repeated double graphics_smoothness_checkerboarding_video = 12
[(unit) = "n%_smallerIsBetter"];
repeated double graphics_smoothness_checkerboarding_wheel_scroll = 13
[(unit) = "n%_smallerIsBetter"];
repeated double graphics_smoothness_percent_dropped_frames_all_animations = 14
[(unit) = "n%_smallerIsBetter"];
repeated double graphics_smoothness_percent_dropped_frames_all_interactions =
15 [(unit) = "n%_smallerIsBetter"];
repeated double graphics_smoothness_percent_dropped_frames_all_sequences = 16
[(unit) = "n%_smallerIsBetter"];
repeated double
graphics_smoothness_percent_dropped_frames_main_thread_main_thread_animation =
17 [(unit) = "n%_smallerIsBetter"];
repeated double graphics_smoothness_percent_dropped_frames_main_thread_raf =
18 [(unit) = "n%_smallerIsBetter"];
repeated double
graphics_smoothness_percent_dropped_frames_main_thread_touch_scroll = 19
[(unit) = "n%_smallerIsBetter"];
repeated double
graphics_smoothness_percent_dropped_frames_main_thread_wheel_scroll = 20
[(unit) = "n%_smallerIsBetter"];
repeated double
graphics_smoothness_percent_dropped_frames_compositor_thread_compositor_animation =
21 [(unit) = "n%_smallerIsBetter"];
repeated double
graphics_smoothness_percent_dropped_frames_compositor_thread_pinch_zoom =
22 [(unit) = "n%_smallerIsBetter"];
repeated double
graphics_smoothness_percent_dropped_frames_compositor_thread_touch_scroll =
23 [(unit) = "n%_smallerIsBetter"];
repeated double
graphics_smoothness_percent_dropped_frames_compositor_thread_wheel_scroll =
24 [(unit) = "n%_smallerIsBetter"];
repeated double
graphics_smoothness_percent_dropped_frames_main_thread_universal = 25
[(unit) = "n%_smallerIsBetter"];
repeated double
graphics_smoothness_percent_dropped_frames_compositor_thread_universal =
26 [(unit) = "n%_smallerIsBetter"];
repeated double
graphics_smoothness_percent_dropped_frames_slower_thread_universal = 27
[(unit) = "n%_smallerIsBetter"];
repeated double
graphics_smoothness_percent_dropped_frames_scrolling_thread_touch_scroll =
28 [(unit) = "n%_smallerIsBetter"];
repeated double
graphics_smoothness_percent_dropped_frames_scrolling_thread_wheel_scroll =
29 [(unit) = "n%_smallerIsBetter"];
repeated double memory_gpu_peak_memory_usage_scroll = 30
[(unit) = "sizeInBytes_smallerIsBetter"];
repeated double memory_gpu_peak_memory_usage_page_load = 31
[(unit) = "sizeInBytes_smallerIsBetter"];
}
extend TraceMetrics {
optional UMAMetrics uma_metrics = 462;
}
-- Copyright 2020 Google LLC.
-- SPDX-License-Identifier: Apache-2.0
CREATE VIEW histogram_samples AS
SELECT
EXTRACT_ARG(arg_set_id, 'chrome_histogram_sample.name') as histogram_name,
EXTRACT_ARG(arg_set_id, 'chrome_histogram_sample.sample') as sample
FROM slice
WHERE name = 'HistogramSample'
AND category = 'disabled-by-default-histogram_samples';
CREATE VIEW uma_metrics_output AS
SELECT UMAMetrics(
'compositing_display_draw_to_swap', (
SELECT RepeatedField(sample / 1e3)
FROM histogram_samples
WHERE histogram_name = 'Compositing.Display.DrawToSwapUs'
),
'compositor_latency_total_latency', (
SELECT RepeatedField(sample / 1e3)
FROM histogram_samples
WHERE histogram_name = 'CompositorLatency.TotalLatency'
),
'event_latency_scroll_begin_touch_time_to_scroll_update_swap_begin4', (
SELECT RepeatedField(sample / 1e3)
FROM histogram_samples
WHERE histogram_name = 'Event.Latency.ScrollBegin.Touch.TimeToScrollUpdateSwapBegin4'
),
'event_latency_scroll_update_touch_time_to_scroll_update_swap_begin4', (
SELECT RepeatedField(sample / 1e3)
FROM histogram_samples
WHERE histogram_name = 'Event.Latency.ScrollUpdate.Touch.TimeToScrollUpdateSwapBegin4'
),
'event_latency_scroll_begin_wheel_time_to_scroll_update_swap_begin4', (
SELECT RepeatedField(sample / 1e3)
FROM histogram_samples
WHERE histogram_name = 'Event.Latency.ScrollBegin.Wheel.TimeToScrollUpdateSwapBegin4'
),
'event_latency_scroll_update_wheel_time_to_scroll_update_swap_begin4', (
SELECT RepeatedField(sample / 1e3)
FROM histogram_samples
WHERE histogram_name = 'Event.Latency.ScrollUpdate.Wheel.TimeToScrollUpdateSwapBegin4'
),
'graphics_smoothness_checkerboarding_compositor_animation', (
SELECT RepeatedField(sample / 1e2)
FROM histogram_samples
WHERE histogram_name = 'Graphics.Smoothness.Checkerboarding.CompositorAnimation'
),
'graphics_smoothness_checkerboarding_main_thread_animation', (
SELECT RepeatedField(sample / 1e2)
FROM histogram_samples
WHERE histogram_name = 'Graphics.Smoothness.Checkerboarding.MainThreadAnimation'
),
'graphics_smoothness_checkerboarding_pitch_zoom', (
SELECT RepeatedField(sample / 1e2)
FROM histogram_samples
WHERE histogram_name = 'Graphics.Smoothness.Checkerboarding.PinchZoom'
),
'graphics_smoothness_checkerboarding_raf', (
SELECT RepeatedField(sample / 1e2)
FROM histogram_samples
WHERE histogram_name = 'Graphics.Smoothness.Checkerboarding.RAF'
),
'graphics_smoothness_checkerboarding_touch_scroll', (
SELECT RepeatedField(sample / 1e2)
FROM histogram_samples
WHERE histogram_name = 'Graphics.Smoothness.Checkerboarding.TouchScroll'
),
'graphics_smoothness_checkerboarding_video', (
SELECT RepeatedField(sample / 1e2)
FROM histogram_samples
WHERE histogram_name = 'Graphics.Smoothness.Checkerboarding.Video'
),
'graphics_smoothness_checkerboarding_wheel_scroll', (
SELECT RepeatedField(sample / 1e2)
FROM histogram_samples
WHERE histogram_name = 'Graphics.Smoothness.Checkerboarding.WheelScroll'
),
'graphics_smoothness_percent_dropped_frames_all_animations', (
SELECT RepeatedField(sample / 1e2)
FROM histogram_samples
WHERE histogram_name = 'Graphics.Smoothness.PercentDroppedFrames.AllAnimations'
),
'graphics_smoothness_percent_dropped_frames_all_interactions', (
SELECT RepeatedField(sample / 1e2)
FROM histogram_samples
WHERE histogram_name = 'Graphics.Smoothness.PercentDroppedFrames.AllInteractions'
),
'graphics_smoothness_percent_dropped_frames_all_sequences', (
SELECT RepeatedField(sample / 1e2)
FROM histogram_samples
WHERE histogram_name = 'Graphics.Smoothness.PercentDroppedFrames.AllSequences'
),
'graphics_smoothness_percent_dropped_frames_main_thread_main_thread_animation', (
SELECT RepeatedField(sample / 1e2)
FROM histogram_samples
WHERE histogram_name = 'Graphics.Smoothness.PercentDroppedFrames.MainThread.MainThreadAnimation'
),
'graphics_smoothness_percent_dropped_frames_main_thread_raf', (
SELECT RepeatedField(sample / 1e2)
FROM histogram_samples
WHERE histogram_name = 'Graphics.Smoothness.PercentDroppedFrames.MainThread.RAF'
),
'graphics_smoothness_percent_dropped_frames_main_thread_touch_scroll', (
SELECT RepeatedField(sample / 1e2)
FROM histogram_samples
WHERE histogram_name = 'Graphics.Smoothness.PercentDroppedFrames.MainThread.TouchScroll'
),
'graphics_smoothness_percent_dropped_frames_main_thread_wheel_scroll', (
SELECT RepeatedField(sample / 1e2)
FROM histogram_samples
WHERE histogram_name = 'Graphics.Smoothness.PercentDroppedFrames.MainThread.WheelScroll'
),
'graphics_smoothness_percent_dropped_frames_compositor_thread_compositor_animation', (
SELECT RepeatedField(sample / 1e2)
FROM histogram_samples
WHERE histogram_name = 'Graphics.Smoothness.PercentDroppedFrames.CompositorThread.CompositorAnimation'
),
'graphics_smoothness_percent_dropped_frames_compositor_thread_pinch_zoom', (
SELECT RepeatedField(sample / 1e2)
FROM histogram_samples
WHERE histogram_name = 'Graphics.Smoothness.PercentDroppedFrames.CompositorThread.PinchZoom'
),
'graphics_smoothness_percent_dropped_frames_compositor_thread_touch_scroll', (
SELECT RepeatedField(sample / 1e2)
FROM histogram_samples
WHERE histogram_name = 'Graphics.Smoothness.PercentDroppedFrames.CompositorThread.TouchScroll'
),
'graphics_smoothness_percent_dropped_frames_compositor_thread_wheel_scroll', (
SELECT RepeatedField(sample / 1e2)
FROM histogram_samples
WHERE histogram_name = 'Graphics.Smoothness.PercentDroppedFrames.CompositorThread.WheelScroll'
),
'graphics_smoothness_percent_dropped_frames_main_thread_universal', (
SELECT RepeatedField(sample / 1e2)
FROM histogram_samples
WHERE histogram_name = 'Graphics.Smoothness.PercentDroppedFrames.MainThread.Universal'
),
'graphics_smoothness_percent_dropped_frames_compositor_thread_universal', (
SELECT RepeatedField(sample / 1e2)
FROM histogram_samples
WHERE histogram_name = 'Graphics.Smoothness.PercentDroppedFrames.CompositorThread.Universal'
),
'graphics_smoothness_percent_dropped_frames_slower_thread_universal', (
SELECT RepeatedField(sample / 1e2)
FROM histogram_samples
WHERE histogram_name = 'Graphics.Smoothness.PercentDroppedFrames.SlowerThread.Universal'
),
'graphics_smoothness_percent_dropped_frames_scrolling_thread_touch_scroll', (
SELECT RepeatedField(sample / 1e2)
FROM histogram_samples
WHERE histogram_name = 'Graphics.Smoothness.PercentDroppedFrames.ScrollingThread.TouchScroll'
),
'graphics_smoothness_percent_dropped_frames_scrolling_thread_wheel_scroll', (
SELECT RepeatedField(sample / 1e2)
FROM histogram_samples
WHERE histogram_name = 'Graphics.Smoothness.PercentDroppedFrames.ScrollingThread.WheelScroll'
),
'memory_gpu_peak_memory_usage_scroll', (
SELECT RepeatedField(sample * 1e3)
FROM histogram_samples
WHERE histogram_name = 'Memory.GPU.PeakMemoryUsage.Scroll'
),
'memory_gpu_peak_memory_usage_page_load', (
SELECT RepeatedField(sample * 1e3)
FROM histogram_samples
WHERE histogram_name = 'Memory.GPU.PeakMemoryUsage.PageLoad'
)
);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment