lighthouse 10.2.0-dev.20230528 → 10.2.0-dev.20230530

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.
@@ -8,6 +8,7 @@ import {Audit} from './audit.js';
8
8
  import UrlUtils from '../lib/url-utils.js';
9
9
  import {NetworkRecords} from '../computed/network-records.js';
10
10
  import {MainResource} from '../computed/main-resource.js';
11
+ import {EntityClassification} from '../computed/entity-classification.js';
11
12
 
12
13
  class NetworkRequests extends Audit {
13
14
  /**
@@ -31,6 +32,8 @@ class NetworkRequests extends Audit {
31
32
  static async audit(artifacts, context) {
32
33
  const devtoolsLog = artifacts.devtoolsLogs[Audit.DEFAULT_PASS];
33
34
  const records = await NetworkRecords.request(devtoolsLog, context);
35
+ const classifiedEntities = await EntityClassification.request(
36
+ {URL: artifacts.URL, devtoolsLog}, context);
34
37
  const earliestRendererStartTime = records.reduce(
35
38
  (min, record) => Math.min(min, record.rendererStartTime),
36
39
  Infinity
@@ -61,6 +64,8 @@ class NetworkRequests extends Audit {
61
64
  ((record.frameId === mainFrameId) || undefined) :
62
65
  undefined;
63
66
 
67
+ const entity = classifiedEntities.entityByUrl.get(record.url);
68
+
64
69
  return {
65
70
  url: UrlUtils.elideDataURI(record.url),
66
71
  sessionTargetType: record.sessionTargetType,
@@ -77,6 +82,7 @@ class NetworkRequests extends Audit {
77
82
  priority: record.priority,
78
83
  isLinkPreload,
79
84
  experimentalFromMainFrame,
85
+ entity: entity?.name,
80
86
  lrEndTimeDeltaMs: endTimeDeltaMs, // Only exists on Lightrider runs
81
87
  lrTCPMs: TCPMs, // Only exists on Lightrider runs
82
88
  lrRequestMs: requestMs, // Only exists on Lightrider runs
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lighthouse",
3
3
  "type": "module",
4
- "version": "10.2.0-dev.20230528",
4
+ "version": "10.2.0-dev.20230530",
5
5
  "description": "Automated auditing, performance metrics, and best practices for the web.",
6
6
  "main": "./core/index.js",
7
7
  "bin": {