tree: 686299666ea5e27a8d3bf72a06f79ed9116616f9 [path history] [tgz]
  1. measure_memory/
  2. back_forward_cache_restoration.cc
  3. back_forward_cache_restoration.h
  4. back_forward_cache_restoration.idl
  5. background_tracing_helper.cc
  6. background_tracing_helper.h
  7. background_tracing_helper_test.cc
  8. build.gni
  9. DEPS
  10. DIR_METADATA
  11. dom_high_res_time_stamp.idl
  12. dom_window_performance.cc
  13. dom_window_performance.h
  14. epoch_time_stamp.h
  15. epoch_time_stamp.idl
  16. event_counts.cc
  17. event_counts.h
  18. event_counts.idl
  19. event_timing.cc
  20. event_timing.h
  21. First_input_state_machine.md
  22. internals_profiler.cc
  23. internals_profiler.h
  24. internals_profiler.idl
  25. largest_contentful_paint.cc
  26. largest_contentful_paint.h
  27. largest_contentful_paint.idl
  28. layout_shift.cc
  29. layout_shift.h
  30. layout_shift.idl
  31. layout_shift_attribution.cc
  32. layout_shift_attribution.h
  33. layout_shift_attribution.idl
  34. memory_info.cc
  35. memory_info.h
  36. memory_info.idl
  37. memory_info_test.cc
  38. OWNERS
  39. performance.cc
  40. performance.h
  41. performance.idl
  42. performance_element_timing.cc
  43. performance_element_timing.h
  44. performance_element_timing.idl
  45. performance_entry.cc
  46. performance_entry.h
  47. performance_entry.idl
  48. performance_entry_list.idl
  49. performance_entry_names.json5
  50. performance_entry_test.cc
  51. performance_event_timing.cc
  52. performance_event_timing.h
  53. performance_event_timing.idl
  54. performance_long_task_timing.cc
  55. performance_long_task_timing.h
  56. performance_long_task_timing.idl
  57. performance_mark.cc
  58. performance_mark.h
  59. performance_mark.idl
  60. performance_mark_options.idl
  61. performance_mark_test.cc
  62. performance_measure.cc
  63. performance_measure.h
  64. performance_measure.idl
  65. performance_measure_options.idl
  66. performance_navigation.cc
  67. performance_navigation.h
  68. performance_navigation.idl
  69. performance_navigation_timing.cc
  70. performance_navigation_timing.h
  71. performance_navigation_timing.idl
  72. performance_navigation_timing_activation_start.cc
  73. performance_navigation_timing_activation_start.h
  74. performance_navigation_timing_activation_start.idl
  75. performance_navigation_timing_test.cc
  76. performance_observer.cc
  77. performance_observer.h
  78. performance_observer.idl
  79. performance_observer_callback_options.idl
  80. performance_observer_entry_list.cc
  81. performance_observer_entry_list.h
  82. performance_observer_entry_list.idl
  83. performance_observer_init.idl
  84. performance_observer_test.cc
  85. performance_paint_timing.cc
  86. performance_paint_timing.h
  87. performance_paint_timing.idl
  88. performance_resource_timing.cc
  89. performance_resource_timing.h
  90. performance_resource_timing.idl
  91. performance_resource_timing_test.cc
  92. performance_server_timing.cc
  93. performance_server_timing.h
  94. performance_server_timing.idl
  95. performance_test.cc
  96. performance_timing.cc
  97. performance_timing.h
  98. performance_timing.idl
  99. performance_timing_for_reporting.cc
  100. performance_timing_for_reporting.h
  101. performance_user_timing.cc
  102. performance_user_timing.h
  103. Pointer_interaction_state_machine.md
  104. profiler.cc
  105. profiler.h
  106. profiler.idl
  107. profiler_frame.idl
  108. profiler_group.cc
  109. profiler_group.h
  110. profiler_group_test.cc
  111. profiler_init_options.idl
  112. profiler_sample.idl
  113. profiler_stack.idl
  114. profiler_trace.idl
  115. README.md
  116. render_blocking_metrics_reporter.cc
  117. render_blocking_metrics_reporter.h
  118. responsiveness_metrics.cc
  119. responsiveness_metrics.h
  120. soft_navigation_entry.cc
  121. soft_navigation_entry.h
  122. soft_navigation_entry.idl
  123. soft_navigation_heuristics.cc
  124. soft_navigation_heuristics.h
  125. task_attribution_timing.cc
  126. task_attribution_timing.h
  127. task_attribution_timing.idl
  128. time_clamper.cc
  129. time_clamper.h
  130. time_clamper_test.cc
  131. visibility_state_entry.cc
  132. visibility_state_entry.h
  133. visibility_state_entry.idl
  134. window_performance.cc
  135. window_performance.h
  136. window_performance.idl
  137. window_performance_test.cc
  138. worker_global_scope_performance.cc
  139. worker_global_scope_performance.h
  140. worker_global_scope_performance.idl
  141. worker_performance.cc
  142. worker_performance.h
third_party/blink/renderer/core/timing/README.md

renderer/core/timing

Live version

The renderer/core/timing directory contains files related to various web performance APIs.

High Resolution Time

The HR-Time specification introduces the Performance interface, which exposes a high resolution monotonic clock via performance.now() and enables comparing timestamps across various contexts via performance.timeOrigin. This interface is exposed on both Windows and Workers and implemented on the Performance file, with window and worker specific code on WindowPerformance and (WorkerPerformance)(./worker_performance.h), respectively. The Performance interface is tied to its DOM via DOMWindowPerformance and WorkerGlobalScopePerformance.

Any new high resolution timestamps exposed through the web need to be set to the correct resolution to prevent privacy or security issues, and hence should go through the MonotonicTimeTo* methods in Performance, which will delegate the rounding details to the TimeClamper.

Performance Timeline

The Performance-Timeline specification enables exposing additional performance measurements via two methods: directly to the Performance, which can be polled via getter methods, or to a PerformanceObserver, which runs a callback upon receiving new entries. The latter interface is implemented in PerformanceObserver, and is the recommended way to query entries. A single nugget of performance information is encapsulated in a PerformanceEntry, which is the base interface. The type of the PerformanceEntry is codified in its entryType attribute. Newer types of performance entries may not support polling queries via the Performance object, whereas all must support callback queries via PerformanceObserver. This information is the availableFromTimeline bit in the registry. This registry also contains some additional useful information that is entry-type specific. Note that all of the interfaces listed in that table have corresponding files in this folder. While the objects exposing performance measurements via JS are concentrated in this folder, many of the computations are located in other folders. For instance, the Resource-Timing specification measures timing on fetches, and that timing needs to occur at the specific locations in code where the fetching occurs and then plumbed all the way to this folder.

First Input Timing

The PerformanceEventTiming interface provides timing information about the latency of the first discrete user interaction, specifically one of keydown, mousedown, click, a pointerdown followed by a pointerup. (Pointer down may be the start of scrolling, which is not tracked.) This is a subset of the EventTiming API, and provides key metrics to help measure and optimize the first impression on responsiveness of web users. FirstInputStateMachine visualizes the state machine logic of how the first input event timing entry got dispatched from a pipeline of performance event entries.

Event Timing - Interactions

The PerformanceEventTiming interface exposes timing information for each non-continuous event(fullList). Certain events can be further grouped up as interactions by assigning the same non-trivial interactionId. Others will have interactionId with value 0. The purpose of defining an interaction is to group events that fire during the same logical user gesture, so further analysis like INP can be done to better reflect the page responsiveness on user interactions.

PointerInteractionStateMachine visualizes the state machine logic of how the pointer related events (pointerdown, pointerup, pointercancel, click) get grouped up as a single interaction and get dispatched from the event timing pipeline.