6060 const rows = fs.readFileSync('./include-analysis-diff.csv', 'utf8').trim().split('\n').map((line) => line.trim().split(','));
6161
6262 // If there's no include listed, the file itself increased in size
63- const files = rows.filter((row) => row[4] === '').map((row) => [row[0], row[1], row[2], row[3], parseInt(row[5])] );
64- const edges = rows.filter((row) => row[4] !== '').map((row) => [row[0], row[1], row[2], `${row[3]} --> ${row[4]}`, parseInt(row[5])]);
63+ const files = rows.filter((row) => row[4] === '').map((row) => [row[0], row[1], row[2], row[3], parseInt(row[5]), parseInt(row[6]]) );
64+ const edges = rows.filter((row) => row[4] !== '').map((row) => [row[0], row[1], row[2], `${row[3]} --> ${row[4]}`, parseInt(row[5]), parseInt(row[6]) ]);
6565
6666 if (files.length > 0 || edges.length > 0) {
6767 core.summary.addHeading('🔬 Chromium Include Analysis Diff');
@@ -75,15 +75,17 @@ jobs:
7575 { data: 'Previous Analysis', header: true },
7676 { data: 'Filename', header: true },
7777 { data: 'Added Size Increase', header: true },
78+ { data: 'Total Added Size', header: true },
7879 ],
7980 // Sort by added size, then convert it back to string or it won't render
8081 ...files
8182 .sort((a, b) => b[4] - a[4])
82- .map(([url, revision, date, filename, addedSize]) => [
83+ .map(([url, revision, date, filename, addedSize, totalSize ]) => [
8384 `<a href="${url}" title="${revision}">${date}</a>`,
8485 // `<a href="${url}#view=files&filter=${encodeURIComponent("^" + filename + "$")}">${filename}</a>`,
8586 filename,
86- addedSize.toLocaleString(),
87+ `+${addedSize.toLocaleString()}`,
88+ `+${totalSize.toLocaleString()}`,
8789 ]),
8890 ]);
8991 }
0 commit comments