-
-
Save xnimorz/6b939a15050000b853e73fb33af5114f to your computer and use it in GitHub Desktop.
fmp
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
// Запланировали отрисовку | |
requestAnimationFrame(function() { | |
// кадр еще не отрисовался, но рендер три в этот момент доступно | |
var renderTreeFormed = performance.now(); | |
// После этого raf кадр отрисовался | |
requestAnimationFrame(function() { | |
var fmp = performance.now(); | |
// Пушим себе результаты замера, чтобы затем их отправить на сервер | |
window.globalVars.performance.fmp.push({ | |
renderTreeFormed: renderTreeFormed, | |
fmp: fmp | |
}) | |
}); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment