1-- 2-- Copyright 2022 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-- https://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-- WARNING: This metric should not be used as a source of truth. It is under 17-- active development and the values & meaning might change without 18-- notice. 19 20-- The final table includes the time between the arrival of gesture update 21-- input timestamp, and the time it started being processed by CrBrowserMain. 22 23INCLUDE PERFETTO MODULE chrome.tasks; 24 25SELECT RUN_METRIC( 26 'chrome/chrome_input_to_browser_intervals_base.sql', 27 'slice_table_name', '{{slice_table_name}}', 28 'function_prefix', '{{function_prefix}}' 29); 30 31DROP TABLE IF EXISTS chrome_input_to_browser_intervals; 32CREATE PERFETTO TABLE chrome_input_to_browser_intervals 33AS 34SELECT 35 (SELECT ts FROM {{slice_table_name}} WHERE id = window_start_id) AS window_start_ts, 36 window_start_id, 37 window_end_ts, 38 window_end_id, 39 blocked_gesture, 40 upid, 41 {{function_prefix}}GET_SCROLL_TYPE(blocked_gesture, {{function_prefix}}GET_ENCLOSING_CHROME_TASK_NAME(window_end_id)) AS scroll_type 42FROM chrome_input_to_browser_interval_slice_ids; 43