'Calculate DomContentLoaded
I want to be ensure about the equation of DomContentLoaded time in seconds?
This equation can help me ?
DomContentLoaded = performanceTiming.domContentLoadedEventEnd - performanceTiming.navigationStart
Solution 1:[1]
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
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
