• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..16-Feb-2021-

OWNERSH A D16-Feb-202144 32

READMEH A D16-Feb-20212.2 KiB3833

calculator.ccH A D16-Feb-202112.5 KiB334239

calculator.hH A D16-Feb-20216.9 KiB19077

calculator_unittest.ccH A D16-Feb-202118.5 KiB534388

jank_monitor_impl.ccH A D03-May-202211.5 KiB350231

jank_monitor_impl.hH A D16-Feb-20216 KiB16392

jank_monitor_impl_unittest.ccH A D16-Feb-202117.1 KiB495321

message_loop_observer.ccH A D16-Feb-20211.3 KiB3826

message_loop_observer.hH A D16-Feb-20211.8 KiB5131

metric_source.ccH A D16-Feb-20214.6 KiB12788

metric_source.hH A D16-Feb-20214.2 KiB11155

metric_source_unittest.ccH A D16-Feb-20216.2 KiB179129

native_event_observer.ccH A D03-May-20222.6 KiB8866

native_event_observer.hH A D03-May-20223.5 KiB10568

native_event_observer_browsertest.mmH A D16-Feb-20211.8 KiB6347

native_event_observer_browsertest_win.ccH A D16-Feb-20212 KiB7254

native_event_observer_mac.mmH A D16-Feb-20211.2 KiB3628

watcher.ccH A D16-Feb-20219.1 KiB245163

watcher.hH A D16-Feb-20215.2 KiB13870

watcher_unittest.ccH A D16-Feb-202113.6 KiB360272

README

1The classes in this folder estimate the responsiveness of Chrome by measuring
2execution duration of individual work items on the UI and IO threads of the
3browser process.
4
5There are four types of work items executed on the UI and IO threads.
61) Both the UI and IO threads can have tasks posted to them via the Task
7   Scheduler [e.g. via base::PostTask with a BrowserThread::ID].
82) The UI thread processes native events directly from the message loop
9   [NSEvents on macOS, MSGs on Windows, InputEvents on Android, XEvents on
10   X11, etc.]
113) The IO thread's message pump processes IPCs by listening on data channels
12   [e.g. fds] and waking up on available data.
134) The UI thread's message loop may process other platform-specific sources.
14   This is currently not monitored because there is no consistent way to
15   instrument. If individual sources prove to be a source of non-responsiveness,
16   they will need to be addressed on a case-by-case basis.
17
18The classes in this folder do not monitor the queuing time of work items. The
19work to monitor this is tracked in https://crbug.com/1029137. This is how the
20queuing time of each work item type could be monitored:
21
221) Compute the delta between TimeTicks::Now() when the task starts execution and
23   |PendingTask::queue_time|. The queuing time of low priority tasks should
24   probably be ignored, since it can be long by design.
252) All native events have a creation timestamp which could be compared to
26   TimeTicks::Now() when the event starts execution. However, we have evidence
27   on Windows, macOS and Linux that the timestamp on native events is not
28   reliable. See https://crbug.com/859155#c39.
293) There's no good solution here, since the current wire format for IPCs does
30   not record the time at which the IPC was written to the data channel. The
31   time between reading from the data channel and finishing execution is
32   typically small, as heavy tasks are supposed to be dispatched off the IO
33   thread.
344) As explained above, individual sources should be investigated on a
35   case-by-case basis if they prove to be a source of non-responsiveness.
36
37Design doc: https://docs.google.com/document/d/1vDSGFvJblh7yJ3U3RVB_7qZLubyfTbQdQjuN1GoUNkc/edit
38