Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Page Resources ordered by duration
window.performance.getEntriesByType("resource").sort(function(a, b) {
return b.duration - a.duration;
}).forEach(function(a){
console.log(Math.floor(a.duration), a.name);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment