tree: 607ae4ce405c2eaced10eab90b5d139c6e5b3bfd [path history] [tgz]
  1. measure_memory/
  2. DEPS
  3. DIR_METADATA
  4. OWNERS
  5. README.md
  6. background_tracing_helper.cc
  7. background_tracing_helper.h
  8. background_tracing_helper_test.cc
  9. build.gni
  10. dom_high_res_time_stamp.idl
  11. dom_window_performance.cc
  12. dom_window_performance.h
  13. epoch_time_stamp.h
  14. epoch_time_stamp.idl
  15. event_counts.cc
  16. event_counts.h
  17. event_counts.idl
  18. event_timing.cc
  19. event_timing.h
  20. internals_profiler.cc
  21. internals_profiler.h
  22. internals_profiler.idl
  23. largest_contentful_paint.cc
  24. largest_contentful_paint.h
  25. largest_contentful_paint.idl
  26. layout_shift.cc
  27. layout_shift.h
  28. layout_shift.idl
  29. layout_shift_attribution.cc
  30. layout_shift_attribution.h
  31. layout_shift_attribution.idl
  32. memory_info.cc
  33. memory_info.h
  34. memory_info.idl
  35. memory_info_test.cc
  36. performance.cc
  37. performance.h
  38. performance.idl
  39. performance_element_timing.cc
  40. performance_element_timing.h
  41. performance_element_timing.idl
  42. performance_entry.cc
  43. performance_entry.h
  44. performance_entry.idl
  45. performance_entry_list.idl
  46. performance_entry_names.json5
  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. responsiveness_metrics.cc
  109. responsiveness_metrics.h
  110. task_attribution_timing.cc
  111. task_attribution_timing.h
  112. task_attribution_timing.idl
  113. time_clamper.cc
  114. time_clamper.h
  115. time_clamper_test.cc
  116. visibility_state_entry.cc
  117. visibility_state_entry.h
  118. visibility_state_entry.idl
  119. window_performance.cc
  120. window_performance.h
  121. window_performance.idl
  122. window_performance_test.cc
  123. worker_global_scope_performance.cc
  124. worker_global_scope_performance.h
  125. worker_global_scope_performance.idl
  126. worker_performance.cc
  127. 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.