Skip to content

Instantly share code, notes, and snippets.

@nucliweb
Created April 13, 2015 22:06
Show Gist options
  • Select an option

  • Save nucliweb/fb47dea522fb3b77bf9b to your computer and use it in GitHub Desktop.

Select an option

Save nucliweb/fb47dea522fb3b77bf9b to your computer and use it in GitHub Desktop.
console.profile()
Chrome dev tools tip of the day: use console.profile() and a timeout to gather stats at particular points in your code. For example, a hamburger menu opening.
onClick: function() {
console.profile('Hamburger Open');
setTimeout(function() {
console.profileEnd('Hamburger Open');
}, 1000);
// Do some stuff
}
This will create an entry in the profiles pane of the dev tools when the code executes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment