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