lighthouse 11.7.0-dev.20240403 → 11.7.0-dev.20240404

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -403,6 +403,9 @@ class TraceProcessor {
403
403
  */
404
404
  static getMainThreadTopLevelEvents(trace, startTime = 0, endTime = Infinity) {
405
405
  const topLevelEvents = [];
406
+ /** @type {ToplevelEvent|undefined} */
407
+ let prevToplevel = undefined;
408
+
406
409
  // note: mainThreadEvents is already sorted by event start
407
410
  for (const event of trace.mainThreadEvents) {
408
411
  if (!this.isScheduleableTask(event) || !event.dur) continue;
@@ -411,11 +414,21 @@ class TraceProcessor {
411
414
  const end = (event.ts + event.dur - trace.timeOriginEvt.ts) / 1000;
412
415
  if (start > endTime || end < startTime) continue;
413
416
 
414
- topLevelEvents.push({
417
+ // Temporary fix for a Chrome bug where some RunTask events can be overlapping.
418
+ // We correct that here be ensuring each RunTask ends at least 1 microsecond before the next
419
+ // https://github.com/GoogleChrome/lighthouse/issues/15896
420
+ // https://issues.chromium.org/issues/329678173
421
+ if (prevToplevel && start < prevToplevel.end) {
422
+ prevToplevel.end = start - 0.001;
423
+ }
424
+
425
+ prevToplevel = {
415
426
  start,
416
427
  end,
417
428
  duration: event.dur / 1000,
418
- });
429
+ };
430
+
431
+ topLevelEvents.push(prevToplevel);
419
432
  }
420
433
 
421
434
  return topLevelEvents;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lighthouse",
3
3
  "type": "module",
4
- "version": "11.7.0-dev.20240403",
4
+ "version": "11.7.0-dev.20240404",
5
5
  "description": "Automated auditing, performance metrics, and best practices for the web.",
6
6
  "main": "./core/index.js",
7
7
  "bin": {
@@ -1,25 +0,0 @@
1
- <!--
2
- @license
3
- Copyright 2021 Google LLC
4
- SPDX-License-Identifier: Apache-2.0
5
- -->
6
- <!doctype html>
7
- <html lang="en">
8
- <head>
9
- <meta charset="utf-8">
10
- <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
11
- <link rel="icon" href='data:image/svg+xml;utf8,<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><path d="m14 7 10-7 10 7v10h5v7h-5l5 24H9l5-24H9v-7h5V7Z" fill="%23F63"/><path d="M31.561 24H14l-1.689 8.105L31.561 24ZM18.983 48H9l1.022-4.907L35.723 32.27l1.663 7.98L18.983 48Z" fill="%23FFA385"/><path fill="%23FF3" d="M20.5 10h7v7h-7z"/></svg>'>
12
- <title>Lighthouse Flow Report</title>
13
- <style>/*%%LIGHTHOUSE_FLOW_CSS%%*/</style>
14
- <style>body {margin: 0}</style>
15
- </head>
16
- <body>
17
- <noscript>Lighthouse report requires JavaScript. Please enable.</noscript>
18
-
19
- <main><!-- report populated here --></main>
20
-
21
- <script>window.__LIGHTHOUSE_FLOW_JSON__ = %%LIGHTHOUSE_FLOW_JSON%%;</script>
22
- <script>%%LIGHTHOUSE_FLOW_JAVASCRIPT%%</script>
23
- <script>console.log('window.__LIGHTHOUSE_FLOW_JSON__', __LIGHTHOUSE_FLOW_JSON__);</script>
24
- </body>
25
- </html>