Skip to content

Instantly share code, notes, and snippets.

@remarkablemark
Last active July 19, 2018 18:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save remarkablemark/417018e95208dd6d62c5cbdc7a5a84ff to your computer and use it in GitHub Desktop.
Save remarkablemark/417018e95208dd6d62c5cbdc7a5a84ff to your computer and use it in GitHub Desktop.
Measuring frontend performance: https://www.youtube.com/watch?v=V8oTJ8OZ5S0

The Performance API:

window.performance

Time to Interactive (TTI):

const { domInteractive, requestStart } = window.performance;
const TTI = domInteractive - requestStart;

Resource Timing:

const getResourceEntries = () => (
  window.performance.getEntriesByType('resource') || []
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment