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