New issue
Advanced search Search tips

Issue 914391 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Feature

Blocking:
issue 823744



Sign in to add a comment

Count all relevant input events for EventCounts in EventTiming webperf API

Project Member Reported by charliea@chromium.org, Dec 12

Issue description

EventTiming is a new webperf API that helps site owners gain insight into slow input events that take place on their site.

The specific types of input events are counted are:

MouseEvents
PointerEvents
TouchEvents
KeyboardEvents
WheelEvents
InputEvents
CompositionEvents

However, knowing the number of slow events of each type isn't enough to understand whether a change has made a site slower: the site also needs to track the *total* number of events. Otherwise, it's impossible to tell whether, for example, a recent change just increased engagement in the site, causing users to click more, or whether the fraction of slow clicks has actually increased.

This bug tracks this effort to count and expose the total number of events, as described in https://wicg.github.io/event-timing/#sec-event-counts.
 
Labels: -Type-Bug Type-Feature
Status: Started (was: Assigned)
The tricky part with all of this is that many input events aren't reaching the renderer main process where we need to return a count to the user. Some get filtered out in the browser main thread and others get filtered out on the renderer compositor thread.

Navid and I think that the place where it makes the most sense to start here is adding an UMA that enumerates the possible outcomes for an event that hits the browser main thread filter. The possible outcomes we see are:

- The event is unfiltered
- The event is filtered due to no page handlers
- The event is filtered because a previous event in the touch sequence timed out
- The event is filtered because, even though there are handlers on the page, no touch points in the event have handlers

The reason that this makes sense to do is that any Finch trial we add in the future that eliminates browser main input filtering should drop all filtered counts to zero, so we can use this UMA to determine whether the Finch trial is working as intended.

Navid offered a ton of help in getting such a histogram working yesterday. I'm finishing up the unit tests (testing the no touch point handlers case has been particularly tricky), but am hoping to get the CL out by the end of the day.
Update: the unit tests are now finished and the CL is out for review. Hoping to get that CL submitted tomorrow and get a CL drafted tomorrow that adds a Finch trial for disabling browser-side event filtering.
Cc: sadrul@chromium.org
Blocking: 823744
Project Member

Comment 7 by bugdroid1@chromium.org, Dec 19

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8c86c8ad1fa4a159606785fd4554ca3cb7c725fa

commit 8c86c8ad1fa4a159606785fd4554ca3cb7c725fa
Author: Charlie Andrews <charliea@chromium.org>
Date: Wed Dec 19 15:19:16 2018

Adds an UMA to count touch events filtered on the browser main thread

This UMA histogram will help us evaluate the feasibility of eliminating
browser main thread event filtering. This filtering is problematic
because it filters out events far away from where we'd ideally count
them for the total event counts for the EventTiming web perf API.

Bug: 914391
Change-Id: I5ee5de88fe937e26c75cfa6a1eeca7f3174e7a32
Reviewed-on: https://chromium-review.googlesource.com/c/1373870
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Navid Zolghadr <nzolghadr@chromium.org>
Commit-Queue: Charlie Andrews <charliea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#617837}
[modify] https://crrev.com/8c86c8ad1fa4a159606785fd4554ca3cb7c725fa/content/browser/renderer_host/input/passthrough_touch_event_queue.cc
[modify] https://crrev.com/8c86c8ad1fa4a159606785fd4554ca3cb7c725fa/content/browser/renderer_host/input/passthrough_touch_event_queue.h
[modify] https://crrev.com/8c86c8ad1fa4a159606785fd4554ca3cb7c725fa/content/browser/renderer_host/input/passthrough_touch_event_queue_unittest.cc
[modify] https://crrev.com/8c86c8ad1fa4a159606785fd4554ca3cb7c725fa/tools/metrics/histograms/enums.xml
[modify] https://crrev.com/8c86c8ad1fa4a159606785fd4554ca3cb7c725fa/tools/metrics/histograms/histograms.xml

Sign in to add a comment