()
| 48 | } |
| 49 | |
| 50 | function measureLongTasks() { |
| 51 | const supported = PerformanceObserver.supportedEntryTypes; |
| 52 | if (!supported || supported.indexOf('longtask') === -1) { |
| 53 | return; |
| 54 | } |
| 55 | longTasks = []; |
| 56 | const longTaskObserver = new PerformanceObserver((list) => |
| 57 | list.getEntries().forEach((entry) => longTasks.push(entry)) |
| 58 | ); |
| 59 | longTaskObserver.observe({entryTypes: ['longtask']}); |
| 60 | } |
| 61 | |
| 62 | function measureTimeToInteractive() { |
| 63 | measureStarted = Date.now(); |
no test coverage detected