• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1-- Copyright 2023 The Chromium Authors
2-- Use of this source code is governed by a BSD-style license that can be
3-- found in the LICENSE file.
4
5INCLUDE PERFETTO MODULE slices.with_context;
6
7-- Chrome web content interactions (InteractionToFirstPaint), including
8-- associated high-level metrics and properties.
9--
10-- Multiple events may occur for the same interaction; each row in this table
11-- represents the primary (longest) event for the interaction.
12--
13-- Web content interactions are discrete, as opposed to sustained (e.g.
14-- scrolling); and only occur with the web content itself, as opposed to other
15-- parts of Chrome (e.g. omnibox). Interaction events include taps, clicks,
16-- keyboard input (typing), and drags.
17CREATE PERFETTO TABLE chrome_web_content_interactions(
18  -- Unique id for this interaction.
19  id LONG,
20  -- Start timestamp of the event. Because multiple events may occur for the
21  -- same interaction, this is the start timestamp of the longest event.
22  ts TIMESTAMP,
23  -- Duration of the event. Because multiple events may occur for the same
24  -- interaction, this is the duration of the longest event.
25  dur DURATION,
26  -- The interaction type.
27  interaction_type STRING,
28  -- The total duration of all events that occurred for the same interaction.
29  total_duration_ms LONG,
30  -- The process id this event occurred on.
31  renderer_upid LONG
32) AS
33SELECT
34  id,
35  ts,
36  dur,
37  EXTRACT_ARG(arg_set_id, 'web_content_interaction.type') AS interaction_type,
38  EXTRACT_ARG(
39    arg_set_id,
40    'web_content_interaction.total_duration_ms'
41  ) AS total_duration_ms,
42  upid AS renderer_upid
43FROM process_slice
44WHERE name = 'Web Interaction';
45