Skip to content

Instantly share code, notes, and snippets.

@fillano
Last active November 20, 2015 11:35
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 fillano/411bc51f0bfe371f7736 to your computer and use it in GitHub Desktop.
Save fillano/411bc51f0bfe371f7736 to your computer and use it in GitHub Desktop.
(function(p){alert(function(t){var ret=[];for(var i in t)if(typeof t[i]!=='function'&&t[i]>0)ret.push({name:i,value:t[i]});return ret}(p).sort(function(a,b){return a.value-b.value}).map(function(d,i,a){if(i>0){return d.name+':'+(d.value-a[i-1].value)}else{return d.name+':0'}}).join('\n'))})(performance.timing)
@fillano
Copy link
Author

fillano commented Nov 20, 2015

copy&paste to browser's dev console and run. will 'alert' the sorted performance.timing info with calculated diff of timestamp from previous step.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment