()
| 264 | const longTasksMonitor = observeLongTasks(); |
| 265 | |
| 266 | let sendWpoInfo = function () { |
| 267 | updateProgressTip('正在处理性能数据...', 60); |
| 268 | // 合并长任务数据 |
| 269 | wpoInfo.longTasks = longTasksMonitor; |
| 270 | |
| 271 | // 获取核心Web指标 |
| 272 | getCoreWebVitals().then(webVitals => { |
| 273 | updateProgressTip('正在完成数据采集...', 80); |
| 274 | wpoInfo.webVitals = webVitals; |
| 275 | |
| 276 | chrome.runtime.sendMessage({ |
| 277 | type: 'fh-dynamic-any-thing', |
| 278 | thing: 'set-page-timing-data', |
| 279 | wpoInfo: wpoInfo |
| 280 | }, () => { |
| 281 | updateProgressTip('数据采集完成!', 100); |
| 282 | setTimeout(removeProgressTip, 1000); |
| 283 | }); |
| 284 | }); |
| 285 | }; |
| 286 | |
| 287 | let getHttpHeaders = function () { |
| 288 | if (wpoInfo.header && wpoInfo.time && wpoInfo.pageInfo) { |
no test coverage detected