Created
July 17, 2017 10:13
-
-
Save MikeRatcliffe/176bf3061e891fe3fa53835b9831dac7 to your computer and use it in GitHub Desktop.
Performance API notes
This file contains hidden or 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
performance.mark("startFoo"); | |
// A time consuming function | |
foo(); | |
performance.mark("endFoo"); | |
performance.measure("durationFoo", "startFoo", "endFoo"); | |
// Delete all Marks | |
performance.clearMarks(); | |
// Delete the Measure "durationFoo" | |
performance.clearMeasure("durationFoo"); | |
window.performance.clearMeasures('measure_load_from_dom'); | |
var items = window.performance.getEntriesByType('mark'); | |
var items = window.performance.getEntriesByType('measure'); | |
var items = window.performance.getEntriesByName('mark_fully_loaded'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment