File tree 1 file changed +12
-1
lines changed
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ async function captureMultipleScreenshots() {
23
23
try {
24
24
const data = fs . readFileSync ( OUTPUT_JSON , 'utf8' ) ;
25
25
existingJson = JSON . parse ( data ) ;
26
- } catch ( e ) {
26
+ } catch {
27
27
// ignore
28
28
}
29
29
@@ -91,6 +91,14 @@ async function captureMultipleScreenshots() {
91
91
const lcpScore =
92
92
pagespeedOutput ?. lighthouseResult ?. audits ?. [ 'largest-contentful-paint' ] ?. score ;
93
93
94
+ const loadExpMetrics = pagespeedOutput . loadingExperience ?. metrics ;
95
+ // ms score of the 75th percentile of the page users
96
+ const inpMs = loadExpMetrics ?. INTERACTION_TO_NEXT_PAINT ?. percentile ;
97
+ // no unit, less than 0.1 is good
98
+ const clsScore = loadExpMetrics ?. CUMULATIVE_LAYOUT_SHIFT_SCORE ?. percentile / 100 ;
99
+ // not core but interesting
100
+ const ttfbMs = loadExpMetrics ?. EXPERIMENTAL_TIME_TO_FIRST_BYTE ?. percentile ;
101
+
94
102
const ttiDisplay = pagespeedOutput ?. lighthouseResult ?. audits ?. interactive ?. displayValue ;
95
103
const ttiScore = pagespeedOutput ?. lighthouseResult ?. audits ?. interactive ?. score ;
96
104
@@ -99,6 +107,9 @@ async function captureMultipleScreenshots() {
99
107
const score = pagespeedOutput ?. lighthouseResult ?. categories ?. performance ?. score ;
100
108
const perf = {
101
109
score,
110
+ inpMs,
111
+ clsScore,
112
+ ttfbMs,
102
113
fcpDisplay,
103
114
fcpScore,
104
115
lcpDisplay,
You can’t perform that action at this time.
0 commit comments