I want to be ensure about the equation of DomContentLoaded time in seconds?
This equation can help me ?
DomContentLoaded = performanceTiming.domContentLoadedEventEnd - performanceTiming.navigationStart
I want to be ensure about the equation of DomContentLoaded time in seconds?
This equation can help me ?
DomContentLoaded = performanceTiming.domContentLoadedEventEnd - performanceTiming.navigationStart
How to measure time taken by a function to execute
Check this in regards to measuring the time your functions take
In your function that you want to measure the performance of, use the node built in time checkers
function doPuppeteerStuff = () => {
console.time('puppeteer');
//doPuppeteerMagic()
console.timeEnd('puppeteer');
// Prints: puppeteer: 225.438ms
}
https://nodejs.org/api/console.html#console_console_timeend_label Here is the documentation for it