micmro / performance-bookmarklet

Performance-Bookmarklet helps to analyze the current page through the Resource Timing API, Navigation Timing API and User-Timing - requests by type, domain, load times, marks and more. Sort of a light live WebPageTest.
MIT License
1.14k stars 87 forks source link

Add DOM Content interactive duration #39

Open micmro opened 8 years ago

micmro commented 8 years ago

There is a domContentLoaded mark in the navigation timing, but it would be good to calculate it relative to domLoading.

ref: https://developers.google.com/web/fundamentals/performance/critical-rendering-path/measure-crp

var t = window.performance.timing,
          interactive = t.domInteractive - t.domLoading,
          dcl = t.domContentLoadedEventStart - t.domLoading,
          complete = t.domComplete - t.domLoading;