New issue
Advanced search Search tips

Issue 650338 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Remove Event.TimestampHasValidTimebase metric and replace with a CHECK

Project Member Reported by majidvp@chromium.org, Sep 26 2016

Issue description

Ideally UMA metric should have a very small number. We should strive to fix any case where the input event timestamp does not have a correct timebase. 

Once we are comfortable that the number is low enough then we should remove this histogram and just have a CHECK (or just a fallback logic) instead.


 
Cc: tdres...@chromium.org
I looked at this yesterday and here some stats based on UMA for bad timestamps on the browser side Event.TimestampHasValidTimebase.Browser (we have not implemented the render side yet :( )


Linux: 00.05%  => This is pretty large but we expected it and in fact have a fallback option which corrects bad timestamps.
Android: 0.001%
MacOs & ChromeOS: ~ 0%
Windows: we don't collect this stat as we don't use platform provided timestamp for events.

I think the above data supports removing the UMA collection and replacing it with a DCHECK. For X11 instead of a DCHECK we just keep correcting the bogus time values.


Components: Blink>DOM
Components: -Blink>DOM Blink>Input
Status: Started (was: Assigned)
Project Member

Comment 6 by bugdroid1@chromium.org, Jan 17 2018

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

commit 7f2566804257c75eefe927f6c1a63f5048714dc8
Author: Majid Valipour <majidvp@chromium.org>
Date: Wed Jan 17 06:35:37 2018

Deprecate Event.TimestampHasValidTimebase histogram

The histogram aim was to ensure we are getting valid event timestamp from
underlying operating system. It has now produced enough information so that
we can confidently decide the course of action for each platform.

Here is the summary of percentage of invalid timestamps of each platform:
 - Linux ~ 00.2% Sizable but expected. Fallback logic corrects bad timestamps.
 - Android ~ 0.001%
 - MacOs & ChromeOS: ~ 0%
 - Windows: stats was not collected since platform provided timestamp is not used.

Based on above, we will continue to do the fallback on linux, for all other platforms
replace the UMA collection with a DCHECK so we get traces when this is happening.

The patch also fixes a few unit tests that were failing the new DCHECK. The fix
is done by mocking the tick clock used by the ui/events.
Helper class ScopedEventTestTickClock is introduced to make this mocking easier.

Bug:  650338 
Change-Id: I2d1e62e6b6f30dda014d4effe3d978d4559bd728
Reviewed-on: https://chromium-review.googlesource.com/809091
Commit-Queue: Majid Valipour <majidvp@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: Ilya Sherman <isherman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#529652}
[modify] https://crrev.com/7f2566804257c75eefe927f6c1a63f5048714dc8/content/browser/renderer_host/input/web_input_event_builders_android_unittest.cc
[modify] https://crrev.com/7f2566804257c75eefe927f6c1a63f5048714dc8/tools/metrics/histograms/histograms.xml
[modify] https://crrev.com/7f2566804257c75eefe927f6c1a63f5048714dc8/ui/android/view_android_unittests.cc
[modify] https://crrev.com/7f2566804257c75eefe927f6c1a63f5048714dc8/ui/events/android/motion_event_android_unittest.cc
[modify] https://crrev.com/7f2566804257c75eefe927f6c1a63f5048714dc8/ui/events/event_utils.cc
[modify] https://crrev.com/7f2566804257c75eefe927f6c1a63f5048714dc8/ui/events/ozone/evdev/event_converter_evdev_impl_unittest.cc
[modify] https://crrev.com/7f2566804257c75eefe927f6c1a63f5048714dc8/ui/events/ozone/evdev/gamepad_event_converter_evdev_unittest.cc
[modify] https://crrev.com/7f2566804257c75eefe927f6c1a63f5048714dc8/ui/events/ozone/evdev/tablet_event_converter_evdev_unittest.cc
[modify] https://crrev.com/7f2566804257c75eefe927f6c1a63f5048714dc8/ui/events/ozone/evdev/touch_event_converter_evdev_unittest.cc
[add] https://crrev.com/7f2566804257c75eefe927f6c1a63f5048714dc8/ui/events/test/scoped_event_test_tick_clock.h

Status: Fixed (was: Started)

Sign in to add a comment