Created
June 9, 2015 07:34
-
-
Save Artur-/b9199e38493c92970b73 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
// Measure time from starting page load (enter in location bar) | |
// until all the items are shown | |
var i = setInterval(function() { | |
var e = document.getElementById("itemsLeft"); | |
if (e) { | |
if (e.innerText == "1000 items left") { | |
done = window.performance.now(); // Relative to navigationStart (i.e. enter in loc | |
clearInterval(i); | |
window.alert("Initial load time: "+done+"ms"); | |
} | |
} | |
},1); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment