@@ -123,56 +123,160 @@ const UIStrings = {
123
123
124
124
const str_ = i18n . createMessageInstanceIdFn ( import . meta. url , UIStrings ) ;
125
125
126
+ // Ensure all artifact IDs match the typedefs.
127
+ /** @type {Record<keyof LH.FRArtifacts, string> } */
128
+ const artifacts = {
129
+ DevtoolsLog : '' ,
130
+ Trace : '' ,
131
+ Accessibility : '' ,
132
+ AnchorElements : '' ,
133
+ CacheContents : '' ,
134
+ ConsoleMessages : '' ,
135
+ CSSUsage : '' ,
136
+ Doctype : '' ,
137
+ DOMStats : '' ,
138
+ EmbeddedContent : '' ,
139
+ FontSize : '' ,
140
+ Inputs : '' ,
141
+ FullPageScreenshot : '' ,
142
+ GlobalListeners : '' ,
143
+ IFrameElements : '' ,
144
+ ImageElements : '' ,
145
+ InstallabilityErrors : '' ,
146
+ InspectorIssues : '' ,
147
+ JsUsage : '' ,
148
+ LinkElements : '' ,
149
+ MainDocumentContent : '' ,
150
+ MetaElements : '' ,
151
+ NetworkUserAgent : '' ,
152
+ OptimizedImages : '' ,
153
+ PasswordInputsWithPreventedPaste : '' ,
154
+ ResponseCompression : '' ,
155
+ RobotsTxt : '' ,
156
+ ServiceWorker : '' ,
157
+ ScriptElements : '' ,
158
+ Scripts : '' ,
159
+ SourceMaps : '' ,
160
+ Stacks : '' ,
161
+ TagsBlockingFirstPaint : '' ,
162
+ TapTargets : '' ,
163
+ TraceElements : '' ,
164
+ ViewportDimensions : '' ,
165
+ WebAppManifest : '' ,
166
+ devtoolsLogs : '' ,
167
+ traces : '' ,
168
+ } ;
169
+
170
+ for ( const key of Object . keys ( artifacts ) ) {
171
+ artifacts [ /** @type {keyof typeof artifacts } */ ( key ) ] = key ;
172
+ }
173
+
126
174
/** @type {LH.Config.Json } */
127
175
const defaultConfig = {
128
176
settings : constants . defaultSettings ,
129
- passes : [ {
130
- passName : 'defaultPass' ,
131
- recordTrace : true ,
132
- useThrottling : true ,
133
- pauseAfterFcpMs : 1000 ,
134
- pauseAfterLoadMs : 1000 ,
135
- networkQuietThresholdMs : 1000 ,
136
- cpuQuietThresholdMs : 1000 ,
137
- gatherers : [
138
- 'css-usage' ,
139
- 'js-usage' ,
140
- 'viewport-dimensions' ,
141
- 'console-messages' ,
142
- 'anchor-elements' ,
143
- 'image-elements' ,
144
- 'link-elements' ,
145
- 'meta-elements' ,
146
- 'script-elements' ,
147
- 'scripts' ,
148
- 'iframe-elements' ,
149
- 'inputs' ,
150
- 'main-document-content' ,
151
- 'global-listeners' ,
152
- 'dobetterweb/doctype' ,
153
- 'dobetterweb/domstats' ,
154
- 'dobetterweb/optimized-images' ,
155
- 'dobetterweb/password-inputs-with-prevented-paste' ,
156
- 'dobetterweb/response-compression' ,
157
- 'dobetterweb/tags-blocking-first-paint' ,
158
- 'seo/font-size' ,
159
- 'seo/embedded-content' ,
160
- 'seo/robots-txt' ,
161
- 'seo/tap-targets' ,
162
- 'accessibility' ,
163
- 'trace-elements' ,
164
- 'inspector-issues' ,
165
- 'source-maps' ,
166
- 'full-page-screenshot' ,
167
- ] ,
168
- } ,
169
- {
170
- passName : 'offlinePass' ,
171
- loadFailureMode : 'ignore' ,
172
- gatherers : [
173
- 'service-worker' ,
174
- ] ,
175
- } ] ,
177
+ artifacts : [
178
+ // Artifacts which can be depended on come first.
179
+ { id : artifacts . DevtoolsLog , gatherer : 'devtools-log' } ,
180
+ { id : artifacts . Trace , gatherer : 'trace' } ,
181
+
182
+ { id : artifacts . Accessibility , gatherer : 'accessibility' } ,
183
+ { id : artifacts . AnchorElements , gatherer : 'anchor-elements' } ,
184
+ { id : artifacts . CacheContents , gatherer : 'cache-contents' } ,
185
+ { id : artifacts . ConsoleMessages , gatherer : 'console-messages' } ,
186
+ { id : artifacts . CSSUsage , gatherer : 'css-usage' } ,
187
+ { id : artifacts . Doctype , gatherer : 'dobetterweb/doctype' } ,
188
+ { id : artifacts . DOMStats , gatherer : 'dobetterweb/domstats' } ,
189
+ { id : artifacts . EmbeddedContent , gatherer : 'seo/embedded-content' } ,
190
+ { id : artifacts . FontSize , gatherer : 'seo/font-size' } ,
191
+ { id : artifacts . Inputs , gatherer : 'inputs' } ,
192
+ { id : artifacts . GlobalListeners , gatherer : 'global-listeners' } ,
193
+ { id : artifacts . IFrameElements , gatherer : 'iframe-elements' } ,
194
+ { id : artifacts . ImageElements , gatherer : 'image-elements' } ,
195
+ { id : artifacts . InstallabilityErrors , gatherer : 'installability-errors' } ,
196
+ { id : artifacts . InspectorIssues , gatherer : 'inspector-issues' } ,
197
+ { id : artifacts . JsUsage , gatherer : 'js-usage' } ,
198
+ { id : artifacts . LinkElements , gatherer : 'link-elements' } ,
199
+ { id : artifacts . MainDocumentContent , gatherer : 'main-document-content' } ,
200
+ { id : artifacts . MetaElements , gatherer : 'meta-elements' } ,
201
+ { id : artifacts . NetworkUserAgent , gatherer : 'network-user-agent' } ,
202
+ { id : artifacts . OptimizedImages , gatherer : 'dobetterweb/optimized-images' } ,
203
+ { id : artifacts . PasswordInputsWithPreventedPaste , gatherer : 'dobetterweb/password-inputs-with-prevented-paste' } ,
204
+ { id : artifacts . ResponseCompression , gatherer : 'dobetterweb/response-compression' } ,
205
+ { id : artifacts . RobotsTxt , gatherer : 'seo/robots-txt' } ,
206
+ { id : artifacts . ServiceWorker , gatherer : 'service-worker' } ,
207
+ { id : artifacts . ScriptElements , gatherer : 'script-elements' } ,
208
+ { id : artifacts . Scripts , gatherer : 'scripts' } ,
209
+ { id : artifacts . SourceMaps , gatherer : 'source-maps' } ,
210
+ { id : artifacts . Stacks , gatherer : 'stacks' } ,
211
+ { id : artifacts . TagsBlockingFirstPaint , gatherer : 'dobetterweb/tags-blocking-first-paint' } ,
212
+ { id : artifacts . TapTargets , gatherer : 'seo/tap-targets' } ,
213
+ { id : artifacts . TraceElements , gatherer : 'trace-elements' } ,
214
+ { id : artifacts . ViewportDimensions , gatherer : 'viewport-dimensions' } ,
215
+ { id : artifacts . WebAppManifest , gatherer : 'web-app-manifest' } ,
216
+
217
+ // Artifact copies are renamed for compatibility with legacy artifacts.
218
+ { id : artifacts . devtoolsLogs , gatherer : 'devtools-log-compat' } ,
219
+ { id : artifacts . traces , gatherer : 'trace-compat' } ,
220
+
221
+ // FullPageScreenshot comes at the very end so all other node analysis is captured.
222
+ { id : artifacts . FullPageScreenshot , gatherer : 'full-page-screenshot' } ,
223
+ ] ,
224
+ navigations : [
225
+ {
226
+ id : 'default' ,
227
+ pauseAfterFcpMs : 1000 ,
228
+ pauseAfterLoadMs : 1000 ,
229
+ networkQuietThresholdMs : 1000 ,
230
+ cpuQuietThresholdMs : 1000 ,
231
+ artifacts : [
232
+ // Artifacts which can be depended on come first.
233
+ artifacts . DevtoolsLog ,
234
+ artifacts . Trace ,
235
+
236
+ artifacts . Accessibility ,
237
+ artifacts . AnchorElements ,
238
+ artifacts . CacheContents ,
239
+ artifacts . ConsoleMessages ,
240
+ artifacts . CSSUsage ,
241
+ artifacts . Doctype ,
242
+ artifacts . DOMStats ,
243
+ artifacts . EmbeddedContent ,
244
+ artifacts . FontSize ,
245
+ artifacts . Inputs ,
246
+ artifacts . GlobalListeners ,
247
+ artifacts . IFrameElements ,
248
+ artifacts . ImageElements ,
249
+ artifacts . InstallabilityErrors ,
250
+ artifacts . InspectorIssues ,
251
+ artifacts . JsUsage ,
252
+ artifacts . LinkElements ,
253
+ artifacts . MainDocumentContent ,
254
+ artifacts . MetaElements ,
255
+ artifacts . NetworkUserAgent ,
256
+ artifacts . OptimizedImages ,
257
+ artifacts . PasswordInputsWithPreventedPaste ,
258
+ artifacts . ResponseCompression ,
259
+ artifacts . RobotsTxt ,
260
+ artifacts . ServiceWorker ,
261
+ artifacts . ScriptElements ,
262
+ artifacts . Scripts ,
263
+ artifacts . SourceMaps ,
264
+ artifacts . Stacks ,
265
+ artifacts . TagsBlockingFirstPaint ,
266
+ artifacts . TapTargets ,
267
+ artifacts . TraceElements ,
268
+ artifacts . ViewportDimensions ,
269
+ artifacts . WebAppManifest ,
270
+
271
+ // Compat artifacts come last.
272
+ artifacts . devtoolsLogs ,
273
+ artifacts . traces ,
274
+
275
+ // FullPageScreenshot comes at the very end so all other node analysis is captured.
276
+ artifacts . FullPageScreenshot ,
277
+ ] ,
278
+ } ,
279
+ ] ,
176
280
audits : [
177
281
'is-on-https' ,
178
282
'service-worker' ,
@@ -186,6 +290,7 @@ const defaultConfig = {
186
290
'metrics/total-blocking-time' ,
187
291
'metrics/max-potential-fid' ,
188
292
'metrics/cumulative-layout-shift' ,
293
+ 'metrics/experimental-interaction-to-next-paint' ,
189
294
'errors-in-console' ,
190
295
'server-response-time' ,
191
296
'metrics/interactive' ,
@@ -302,6 +407,7 @@ const defaultConfig = {
302
407
'byte-efficiency/efficient-animated-content' ,
303
408
'byte-efficiency/duplicated-javascript' ,
304
409
'byte-efficiency/legacy-javascript' ,
410
+ 'byte-efficiency/uses-responsive-images-snapshot' ,
305
411
'dobetterweb/doctype' ,
306
412
'dobetterweb/charset' ,
307
413
'dobetterweb/dom-size' ,
@@ -326,8 +432,8 @@ const defaultConfig = {
326
432
'seo/plugins' ,
327
433
'seo/canonical' ,
328
434
'seo/manual/structured-data' ,
435
+ 'work-during-interaction' ,
329
436
] ,
330
-
331
437
groups : {
332
438
'metrics' : {
333
439
title : str_ ( UIStrings . metricGroupTitle ) ,
@@ -420,6 +526,7 @@ const defaultConfig = {
420
526
{ id : 'total-blocking-time' , weight : 30 , group : 'metrics' , acronym : 'TBT' , relevantAudits : metricsToAudits . tbtRelevantAudits } ,
421
527
{ id : 'largest-contentful-paint' , weight : 25 , group : 'metrics' , acronym : 'LCP' , relevantAudits : metricsToAudits . lcpRelevantAudits } ,
422
528
{ id : 'cumulative-layout-shift' , weight : 15 , group : 'metrics' , acronym : 'CLS' , relevantAudits : metricsToAudits . clsRelevantAudits } ,
529
+ { id : 'experimental-interaction-to-next-paint' , weight : 0 , group : 'metrics' , acronym : 'INP' , relevantAudits : metricsToAudits . inpRelevantAudits } ,
423
530
424
531
// These are our "invisible" metrics. Not displayed, but still in the LHR.
425
532
{ id : 'max-potential-fid' , weight : 0 , group : 'hidden' } ,
@@ -466,6 +573,8 @@ const defaultConfig = {
466
573
{ id : 'unsized-images' , weight : 0 } ,
467
574
{ id : 'viewport' , weight : 0 } ,
468
575
{ id : 'no-unload-listeners' , weight : 0 } ,
576
+ { id : 'uses-responsive-images-snapshot' , weight : 0 } ,
577
+ { id : 'work-during-interaction' , weight : 0 } ,
469
578
470
579
// Budget audits.
471
580
{ id : 'performance-budget' , weight : 0 , group : 'budgets' } ,
0 commit comments