Skip to content

Instantly share code, notes, and snippets.

@natecavanaugh
Created October 31, 2012 00:16
Show Gist options
  • Save natecavanaugh/3984017 to your computer and use it in GitHub Desktop.
Save natecavanaugh/3984017 to your computer and use it in GitHub Desktop.
performance timing log
var pt = A.one('#manageContentDialog').get('contentWindow.performance.timing');
var inSec = function(v){return v /= 1000;};
console.log('Network latency: %d, Entire load: %d, page load time: %d', inSec(pt.responseEnd - pt.fetchStart), inSec(pt.loadEventEnd-pt.navigationStart), inSec(pt.loadEventEnd-pt.responseEnd));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment