Skip to content

Instantly share code, notes, and snippets.

@Dammmien
Created October 10, 2014 15:09
Show Gist options
  • Save Dammmien/dc6ae56dbf08c2b8200b to your computer and use it in GitHub Desktop.
Save Dammmien/dc6ae56dbf08c2b8200b to your computer and use it in GitHub Desktop.
Log load time in Google Chrome
(function() {
console.clear();
var loadTimes = chrome.loadTimes();
console.log( "requestTime................. " + ( loadTimes.startLoadTime - loadTimes.requestTime ).toFixed( 2 ) + 's' );
console.log( "commitLoadTime.............. " + ( loadTimes.commitLoadTime - loadTimes.startLoadTime ).toFixed( 2 ) + 's' );
console.log( "finishDocumentLoadTime...... " + ( loadTimes.finishDocumentLoadTime - loadTimes.startLoadTime ).toFixed( 2 ) + 's' );
console.log( "finishLoadTime.............. " + ( loadTimes.finishLoadTime - loadTimes.startLoadTime ).toFixed( 2 ) + 's' );
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment