Skip to content

Commit ae0f076

Browse files
authored
report: specify transfer or resource size for columns
1 parent 2f3da7d commit ae0f076

19 files changed

+52
-42
lines changed

lighthouse-core/audits/byte-efficiency/efficient-animated-content.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class EfficientAnimatedContent extends ByteEfficiencyAudit {
7777
/** @type {LH.Audit.Details.Opportunity['headings']} */
7878
const headings = [
7979
{key: 'url', valueType: 'url', label: str_(i18n.UIStrings.columnURL)},
80-
{key: 'totalBytes', valueType: 'bytes', label: str_(i18n.UIStrings.columnSize)},
80+
{key: 'totalBytes', valueType: 'bytes', label: str_(i18n.UIStrings.columnResourceSize)},
8181
{key: 'wastedBytes', valueType: 'bytes', label: str_(i18n.UIStrings.columnWastedBytes)},
8282
];
8383

lighthouse-core/audits/byte-efficiency/offscreen-images.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ class OffscreenImages extends ByteEfficiencyAudit {
228228
const headings = [
229229
{key: 'url', valueType: 'thumbnail', label: ''},
230230
{key: 'url', valueType: 'url', label: str_(i18n.UIStrings.columnURL)},
231-
{key: 'totalBytes', valueType: 'bytes', label: str_(i18n.UIStrings.columnSize)},
231+
{key: 'totalBytes', valueType: 'bytes', label: str_(i18n.UIStrings.columnResourceSize)},
232232
{key: 'wastedBytes', valueType: 'bytes', label: str_(i18n.UIStrings.columnWastedBytes)},
233233
];
234234

lighthouse-core/audits/byte-efficiency/render-blocking-resources.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ class RenderBlockingResources extends Audit {
216216
/** @type {LH.Audit.Details.Opportunity['headings']} */
217217
const headings = [
218218
{key: 'url', valueType: 'url', label: str_(i18n.UIStrings.columnURL)},
219-
{key: 'totalBytes', valueType: 'bytes', label: str_(i18n.UIStrings.columnSize)},
219+
{key: 'totalBytes', valueType: 'bytes', label: str_(i18n.UIStrings.columnTransferSize)},
220220
{key: 'wastedMs', valueType: 'timespanMs', label: str_(i18n.UIStrings.columnWastedMs)},
221221
];
222222

lighthouse-core/audits/byte-efficiency/total-byte-weight.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class TotalByteWeight extends ByteEfficiencyAudit {
9292
/** @type {LH.Audit.Details.Table['headings']} */
9393
const headings = [
9494
{key: 'url', itemType: 'url', text: str_(i18n.UIStrings.columnURL)},
95-
{key: 'totalBytes', itemType: 'bytes', text: str_(i18n.UIStrings.columnSize)},
95+
{key: 'totalBytes', itemType: 'bytes', text: str_(i18n.UIStrings.columnTransferSize)},
9696
];
9797

9898
const tableDetails = ByteEfficiencyAudit.makeTableDetails(headings, results);

lighthouse-core/audits/byte-efficiency/unminified-css.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class UnminifiedCSS extends ByteEfficiencyAudit {
105105
/** @type {LH.Audit.Details.Opportunity['headings']} */
106106
const headings = [
107107
{key: 'url', valueType: 'url', label: str_(i18n.UIStrings.columnURL)},
108-
{key: 'totalBytes', valueType: 'bytes', label: str_(i18n.UIStrings.columnSize)},
108+
{key: 'totalBytes', valueType: 'bytes', label: str_(i18n.UIStrings.columnTransferSize)},
109109
{key: 'wastedBytes', valueType: 'bytes', label: str_(i18n.UIStrings.columnWastedBytes)},
110110
];
111111

lighthouse-core/audits/byte-efficiency/unminified-javascript.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class UnminifiedJavaScript extends ByteEfficiencyAudit {
102102
/** @type {LH.Audit.Details.Opportunity['headings']} */
103103
const headings = [
104104
{key: 'url', valueType: 'url', label: str_(i18n.UIStrings.columnURL)},
105-
{key: 'totalBytes', valueType: 'bytes', label: str_(i18n.UIStrings.columnSize)},
105+
{key: 'totalBytes', valueType: 'bytes', label: str_(i18n.UIStrings.columnTransferSize)},
106106
{key: 'wastedBytes', valueType: 'bytes', label: str_(i18n.UIStrings.columnWastedBytes)},
107107
];
108108

lighthouse-core/audits/byte-efficiency/unused-css-rules.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class UnusedCSSRules extends ByteEfficiencyAudit {
5656
/** @type {LH.Audit.Details.Opportunity['headings']} */
5757
const headings = [
5858
{key: 'url', valueType: 'url', label: str_(i18n.UIStrings.columnURL)},
59-
{key: 'totalBytes', valueType: 'bytes', label: str_(i18n.UIStrings.columnSize)},
59+
{key: 'totalBytes', valueType: 'bytes', label: str_(i18n.UIStrings.columnTransferSize)},
6060
{key: 'wastedBytes', valueType: 'bytes', label: str_(i18n.UIStrings.columnWastedBytes)},
6161
];
6262

lighthouse-core/audits/byte-efficiency/unused-javascript.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ class UnusedJavaScript extends ByteEfficiencyAudit {
256256
headings: [
257257
/* eslint-disable max-len */
258258
{key: 'url', valueType: 'url', subRows: {key: 'sources', valueType: 'code'}, label: str_(i18n.UIStrings.columnURL)},
259-
{key: 'totalBytes', valueType: 'bytes', subRows: {key: 'sourceBytes'}, label: str_(i18n.UIStrings.columnSize)},
259+
{key: 'totalBytes', valueType: 'bytes', subRows: {key: 'sourceBytes'}, label: str_(i18n.UIStrings.columnTransferSize)},
260260
{key: 'wastedBytes', valueType: 'bytes', subRows: {key: 'sourceWastedBytes'}, label: str_(i18n.UIStrings.columnWastedBytes)},
261261
/* eslint-enable max-len */
262262
],

lighthouse-core/audits/byte-efficiency/uses-long-cache-ttl.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ class CacheHeaders extends Audit {
276276
// TODO(i18n): pre-compute localized duration
277277
{key: 'cacheLifetimeMs', itemType: 'ms', text: str_(i18n.UIStrings.columnCacheTTL),
278278
displayUnit: 'duration'},
279-
{key: 'totalBytes', itemType: 'bytes', text: str_(i18n.UIStrings.columnSize),
279+
{key: 'totalBytes', itemType: 'bytes', text: str_(i18n.UIStrings.columnTransferSize),
280280
displayUnit: 'kb', granularity: 1},
281281
];
282282

lighthouse-core/audits/byte-efficiency/uses-optimized-images.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ class UsesOptimizedImages extends ByteEfficiencyAudit {
119119
const headings = [
120120
{key: 'url', valueType: 'thumbnail', label: ''},
121121
{key: 'url', valueType: 'url', label: str_(i18n.UIStrings.columnURL)},
122-
{key: 'totalBytes', valueType: 'bytes', label: str_(i18n.UIStrings.columnSize)},
122+
{key: 'totalBytes', valueType: 'bytes', label: str_(i18n.UIStrings.columnResourceSize)},
123123
{key: 'wastedBytes', valueType: 'bytes', label: str_(i18n.UIStrings.columnWastedBytes)},
124124
];
125125

lighthouse-core/audits/byte-efficiency/uses-responsive-images.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ class UsesResponsiveImages extends ByteEfficiencyAudit {
140140
const headings = [
141141
{key: 'url', valueType: 'thumbnail', label: ''},
142142
{key: 'url', valueType: 'url', label: str_(i18n.UIStrings.columnURL)},
143-
{key: 'totalBytes', valueType: 'bytes', label: str_(i18n.UIStrings.columnSize)},
143+
{key: 'totalBytes', valueType: 'bytes', label: str_(i18n.UIStrings.columnResourceSize)},
144144
{key: 'wastedBytes', valueType: 'bytes', label: str_(i18n.UIStrings.columnWastedBytes)},
145145
];
146146

lighthouse-core/audits/byte-efficiency/uses-text-compression.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class ResponsesAreCompressed extends ByteEfficiencyAudit {
8585
/** @type {LH.Audit.Details.Opportunity['headings']} */
8686
const headings = [
8787
{key: 'url', valueType: 'url', label: str_(i18n.UIStrings.columnURL)},
88-
{key: 'totalBytes', valueType: 'bytes', label: str_(i18n.UIStrings.columnSize)},
88+
{key: 'totalBytes', valueType: 'bytes', label: str_(i18n.UIStrings.columnTransferSize)},
8989
{key: 'wastedBytes', valueType: 'bytes', label: str_(i18n.UIStrings.columnWastedBytes)},
9090
];
9191

lighthouse-core/audits/byte-efficiency/uses-webp-images.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class UsesWebPImages extends ByteEfficiencyAudit {
118118
const headings = [
119119
{key: 'url', valueType: 'thumbnail', label: ''},
120120
{key: 'url', valueType: 'url', label: str_(i18n.UIStrings.columnURL)},
121-
{key: 'totalBytes', valueType: 'bytes', label: str_(i18n.UIStrings.columnSize)},
121+
{key: 'totalBytes', valueType: 'bytes', label: str_(i18n.UIStrings.columnResourceSize)},
122122
{key: 'wastedBytes', valueType: 'bytes', label: str_(i18n.UIStrings.columnWastedBytes)},
123123
];
124124

lighthouse-core/audits/third-party-summary.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ class ThirdPartySummary extends Audit {
156156
const headings = [
157157
{key: 'entity', itemType: 'link', text: str_(UIStrings.columnThirdParty)},
158158
{key: 'transferSize', granularity: 1, itemType: 'bytes',
159-
text: str_(i18n.UIStrings.columnSize)},
159+
text: str_(i18n.UIStrings.columnTransferSize)},
160160
{key: 'blockingTime', granularity: 1, itemType: 'ms',
161161
text: str_(UIStrings.columnBlockingTime)},
162162
];

lighthouse-core/lib/i18n/i18n.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,12 @@ const UIStrings = {
5656
displayValueMsSavings: 'Potential savings of {wastedMs, number, milliseconds}\xa0ms',
5757
/** Label for a column in a data table; entries will be the URL of a web resource */
5858
columnURL: 'URL',
59-
/** Label for a column in a data table; entries will be the size of a web resource in kilobytes. */
59+
/** Label for a column in a data table; entries will be the size or quantity of some resource, e.g. the width and height dimensions of an image or the number of images in a web page. */
6060
columnSize: 'Size',
61+
/** Label for a column in a data table; entries will be the file size of a web resource in kilobytes. */
62+
columnResourceSize: 'Resource Size',
63+
/** Label for a column in a data table; entries will be the download size of a web resource in kilobytes. */
64+
columnTransferSize: 'Transfer Size',
6165
/** Label for a column in a data table; entries will be the time to live value of the cache header on a web resource. */
6266
columnCacheTTL: 'Cache TTL',
6367
/** Label for a column in a data table; entries will be the number of kilobytes the user could reduce their page by if they implemented the suggestions. */
@@ -72,8 +76,6 @@ const UIStrings = {
7276
columnResourceType: 'Resource Type',
7377
/** Label for a column in a data table; entries will be the number of network requests done by a webpage. */
7478
columnRequests: 'Requests',
75-
/** Label for a column in a data table; entries will be the number of kilobytes transferred to load a set of files. */
76-
columnTransferSize: 'Transfer Size',
7779
/** Label for a column in a data table; entries will be the names of arbitrary objects, e.g. the name of a Javascript library, or the name of a user defined timing event. */
7880
columnName: 'Name',
7981
/** Label for a column in a data table; entries will be the names of JavaScript code, e.g. the name of a Javascript package or module. */

lighthouse-core/lib/i18n/locales/en-US.json

+3
Original file line numberDiff line numberDiff line change
@@ -1433,6 +1433,9 @@
14331433
"lighthouse-core/lib/i18n/i18n.js | columnRequests": {
14341434
"message": "Requests"
14351435
},
1436+
"lighthouse-core/lib/i18n/i18n.js | columnResourceSize": {
1437+
"message": "Resource Size"
1438+
},
14361439
"lighthouse-core/lib/i18n/i18n.js | columnResourceType": {
14371440
"message": "Resource Type"
14381441
},

lighthouse-core/lib/i18n/locales/en-XL.json

+3
Original file line numberDiff line numberDiff line change
@@ -1433,6 +1433,9 @@
14331433
"lighthouse-core/lib/i18n/i18n.js | columnRequests": {
14341434
"message": "R̂éq̂úêśt̂ś"
14351435
},
1436+
"lighthouse-core/lib/i18n/i18n.js | columnResourceSize": {
1437+
"message": "R̂éŝóûŕĉé Ŝíẑé"
1438+
},
14361439
"lighthouse-core/lib/i18n/i18n.js | columnResourceType": {
14371440
"message": "R̂éŝóûŕĉé T̂ýp̂é"
14381441
},

lighthouse-core/test/results/sample_v2.json

+20-18
Original file line numberDiff line numberDiff line change
@@ -1683,7 +1683,7 @@
16831683
"key": "transferSize",
16841684
"granularity": 1,
16851685
"itemType": "bytes",
1686-
"text": "Size"
1686+
"text": "Transfer Size"
16871687
},
16881688
{
16891689
"key": "blockingTime",
@@ -2445,7 +2445,7 @@
24452445
{
24462446
"key": "totalBytes",
24472447
"itemType": "bytes",
2448-
"text": "Size",
2448+
"text": "Transfer Size",
24492449
"displayUnit": "kb",
24502450
"granularity": 1
24512451
}
@@ -2547,7 +2547,7 @@
25472547
{
25482548
"key": "totalBytes",
25492549
"itemType": "bytes",
2550-
"text": "Size"
2550+
"text": "Transfer Size"
25512551
}
25522552
],
25532553
"items": [
@@ -2632,7 +2632,7 @@
26322632
{
26332633
"key": "totalBytes",
26342634
"valueType": "bytes",
2635-
"label": "Size"
2635+
"label": "Transfer Size"
26362636
},
26372637
{
26382638
"key": "wastedMs",
@@ -2708,7 +2708,7 @@
27082708
{
27092709
"key": "totalBytes",
27102710
"valueType": "bytes",
2711-
"label": "Size"
2711+
"label": "Transfer Size"
27122712
},
27132713
{
27142714
"key": "wastedBytes",
@@ -2788,7 +2788,7 @@
27882788
{
27892789
"key": "totalBytes",
27902790
"valueType": "bytes",
2791-
"label": "Size"
2791+
"label": "Resource Size"
27922792
},
27932793
{
27942794
"key": "wastedBytes",
@@ -2847,7 +2847,7 @@
28472847
{
28482848
"key": "totalBytes",
28492849
"valueType": "bytes",
2850-
"label": "Size"
2850+
"label": "Transfer Size"
28512851
},
28522852
{
28532853
"key": "wastedBytes",
@@ -6056,7 +6056,13 @@
60566056
],
60576057
"lighthouse-core/lib/i18n/i18n.js | columnTransferSize": [
60586058
"audits[performance-budget].details.headings[2].text",
6059-
"audits[resource-summary].details.headings[2].text"
6059+
"audits[resource-summary].details.headings[2].text",
6060+
"audits[third-party-summary].details.headings[1].text",
6061+
"audits[uses-long-cache-ttl].details.headings[2].text",
6062+
"audits[total-byte-weight].details.headings[1].text",
6063+
"audits[render-blocking-resources].details.headings[1].label",
6064+
"audits[unminified-javascript].details.headings[1].label",
6065+
"audits[uses-text-compression].details.headings[1].label"
60606066
],
60616067
"lighthouse-core/lib/i18n/i18n.js | columnOverBudget": [
60626068
"audits[performance-budget].details.headings[4].text",
@@ -6168,16 +6174,6 @@
61686174
"lighthouse-core/audits/third-party-summary.js | columnThirdParty": [
61696175
"audits[third-party-summary].details.headings[0].text"
61706176
],
6171-
"lighthouse-core/lib/i18n/i18n.js | columnSize": [
6172-
"audits[third-party-summary].details.headings[1].text",
6173-
"audits[uses-long-cache-ttl].details.headings[2].text",
6174-
"audits[total-byte-weight].details.headings[1].text",
6175-
"audits[render-blocking-resources].details.headings[1].label",
6176-
"audits[unminified-javascript].details.headings[1].label",
6177-
"audits[uses-webp-images].details.headings[2].label",
6178-
"audits[uses-text-compression].details.headings[1].label",
6179-
"audits[tap-targets].details.headings[1].text"
6180-
],
61816177
"lighthouse-core/audits/third-party-summary.js | columnBlockingTime": [
61826178
"audits[third-party-summary].details.headings[2].text"
61836179
],
@@ -6560,6 +6556,9 @@
65606556
"lighthouse-core/audits/byte-efficiency/uses-webp-images.js | description": [
65616557
"audits[uses-webp-images].description"
65626558
],
6559+
"lighthouse-core/lib/i18n/i18n.js | columnResourceSize": [
6560+
"audits[uses-webp-images].details.headings[2].label"
6561+
],
65636562
"lighthouse-core/audits/byte-efficiency/uses-optimized-images.js | title": [
65646563
"audits[uses-optimized-images].title"
65656564
],
@@ -6814,6 +6813,9 @@
68146813
"lighthouse-core/audits/seo/tap-targets.js | tapTargetHeader": [
68156814
"audits[tap-targets].details.headings[0].text"
68166815
],
6816+
"lighthouse-core/lib/i18n/i18n.js | columnSize": [
6817+
"audits[tap-targets].details.headings[1].text"
6818+
],
68176819
"lighthouse-core/audits/seo/tap-targets.js | overlappingTargetHeader": [
68186820
"audits[tap-targets].details.headings[2].text"
68196821
],

proto/sample_v2_round_trip.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -2438,7 +2438,7 @@
24382438
},
24392439
{
24402440
"key": "totalBytes",
2441-
"label": "Size",
2441+
"label": "Transfer Size",
24422442
"valueType": "bytes"
24432443
},
24442444
{
@@ -2791,7 +2791,7 @@
27912791
"granularity": 1.0,
27922792
"itemType": "bytes",
27932793
"key": "transferSize",
2794-
"text": "Size"
2794+
"text": "Transfer Size"
27952795
},
27962796
{
27972797
"granularity": 1.0,
@@ -2921,7 +2921,7 @@
29212921
{
29222922
"itemType": "bytes",
29232923
"key": "totalBytes",
2924-
"text": "Size"
2924+
"text": "Transfer Size"
29252925
}
29262926
],
29272927
"items": [
@@ -3003,7 +3003,7 @@
30033003
},
30043004
{
30053005
"key": "totalBytes",
3006-
"label": "Size",
3006+
"label": "Transfer Size",
30073007
"valueType": "bytes"
30083008
},
30093009
{
@@ -3189,7 +3189,7 @@
31893189
"granularity": 1.0,
31903190
"itemType": "bytes",
31913191
"key": "totalBytes",
3192-
"text": "Size"
3192+
"text": "Transfer Size"
31933193
}
31943194
],
31953195
"items": [
@@ -3389,7 +3389,7 @@
33893389
},
33903390
{
33913391
"key": "totalBytes",
3392-
"label": "Size",
3392+
"label": "Transfer Size",
33933393
"valueType": "bytes"
33943394
},
33953395
{
@@ -3437,7 +3437,7 @@
34373437
},
34383438
{
34393439
"key": "totalBytes",
3440-
"label": "Size",
3440+
"label": "Resource Size",
34413441
"valueType": "bytes"
34423442
},
34433443
{

0 commit comments

Comments
 (0)