crux-api 3.0.0 → 4.0.0

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.
package/README.md CHANGED
@@ -8,7 +8,7 @@ While using the API in [Treo](https://treo.sh/), we discovered a few complex cas
8
8
  **Features**:
9
9
 
10
10
  - A tiny (500 bytes) wrapper for [Chrome UX Report API](https://developers.google.com/web/tools/chrome-user-experience-report/api/reference);
11
- - Supports both the [record](https://developer.chrome.com/docs/crux/api/) & [history](https://developer.chrome.com/docs/crux/history-api/) API;
11
+ - Supports both the [record](https://developer.chrome.com/docs/crux/api/) and [history](https://developer.chrome.com/docs/crux/history-api/) API;
12
12
  - TypeScript notations for [options and responses](https://developer.chrome.com/docs/crux/api/#request-body);
13
13
  - Isomorphic: works in a browser and node.js;
14
14
  - Returns `null` for the `404 (CrUX data not found)` response;
@@ -38,26 +38,76 @@ The `jsonRecord` is `null` or an `object` with [queryRecord response body](https
38
38
  ```json
39
39
  {
40
40
  "record": {
41
- "key": {
42
- "formFactor": "DESKTOP",
43
- "url": "https://github.com/marketplace"
44
- },
41
+ "key": { "formFactor": "DESKTOP", "url": "https://github.com/marketplace" },
45
42
  "metrics": {
43
+ "largest_contentful_paint_image_time_to_first_byte": { "percentiles": { "p75": 838 } },
44
+ "largest_contentful_paint_resource_type": { "fractions": { "text": 0.3544, "image": 0.6456 } },
46
45
  "first_contentful_paint": {
47
46
  "histogram": [
48
- { "start": 0, "end": 1000, "density": 0.454180602006688 },
49
- { "start": 1000, "end": 3000, "density": 0.52575250836120291 },
50
- { "start": 3000, "density": 0.020066889632107024 }
47
+ { "start": 0, "end": 1800, "density": 0.9194 },
48
+ { "start": 1800, "end": 3000, "density": 0.0576 },
49
+ { "start": 3000, "density": 0.023 }
51
50
  ],
52
- "percentiles": {
53
- "p75": 1365
51
+ "percentiles": { "p75": 1208 }
52
+ },
53
+ "largest_contentful_paint_image_resource_load_delay": { "percentiles": { "p75": 176 } },
54
+ "navigation_types": {
55
+ "fractions": {
56
+ "back_forward_cache": 0.0398,
57
+ "prerender": 0.0089,
58
+ "navigate": 0.7618,
59
+ "navigate_cache": 0,
60
+ "reload": 0.0104,
61
+ "restore": 0.0079,
62
+ "back_forward": 0.1712
54
63
  }
55
64
  },
56
- "cumulative_layout_shift": { ... },
57
- "first_input_delay": { ... },
58
- "largest_contentful_paint": { ... },
59
- "interaction_to_next_paint": { ... },
60
- "experimental_time_to_first_byte": { ... },
65
+ "round_trip_time": {
66
+ "histogram": [
67
+ { "start": 0, "end": 75, "density": 0.4881 },
68
+ { "start": 75, "end": 275, "density": 0.4041 },
69
+ { "start": 275, "density": 0.1078 }
70
+ ],
71
+ "percentiles": { "p75": 153 }
72
+ },
73
+ "cumulative_layout_shift": {
74
+ "histogram": [
75
+ { "start": "0.00", "end": "0.10", "density": 0.9343 },
76
+ { "start": "0.10", "end": "0.25", "density": 0.0511 },
77
+ { "start": "0.25", "density": 0.0146 }
78
+ ],
79
+ "percentiles": { "p75": "0.01" }
80
+ },
81
+ "experimental_time_to_first_byte": {
82
+ "histogram": [
83
+ { "start": 0, "end": 800, "density": 0.6801 },
84
+ { "start": 800, "end": 1800, "density": 0.2999 },
85
+ { "start": 1800, "density": 0.02 }
86
+ ],
87
+ "percentiles": { "p75": 846 }
88
+ },
89
+ "interaction_to_next_paint": {
90
+ "histogram": [
91
+ { "start": 0, "end": 200, "density": 0.9682 },
92
+ { "start": 200, "end": 500, "density": 0.023 },
93
+ { "start": 500, "density": 0.0088 }
94
+ ],
95
+ "percentiles": { "p75": 63 }
96
+ },
97
+ "largest_contentful_paint": {
98
+ "histogram": [
99
+ { "start": 0, "end": 2500, "density": 0.9343 },
100
+ { "start": 2500, "end": 4000, "density": 0.0418 },
101
+ { "start": 4000, "density": 0.0239 }
102
+ ],
103
+ "percentiles": { "p75": 1450 }
104
+ },
105
+ "largest_contentful_paint_image_element_render_delay": { "percentiles": { "p75": 146 } },
106
+ "largest_contentful_paint_image_resource_load_duration": { "percentiles": { "p75": 362 } }
107
+ },
108
+ "collectionPeriod": {
109
+ "firstDate": { "year": 2026, "month": 1, "day": 11 },
110
+ "lastDate": { "year": 2026, "month": 2, "day": 7 }
61
111
  }
62
112
  },
63
113
  "urlNormalizationDetails": {
@@ -70,13 +120,13 @@ The `jsonRecord` is `null` or an `object` with [queryRecord response body](https
70
120
  **Fetch historic data for a URL**:
71
121
 
72
122
  ```js
73
- import { createQueryRecord } from 'crux-api'
74
- const queryRecord = createQueryHistoryRecord({ key: CRUX_API_KEY })
123
+ import { createQueryHistoryRecord } from 'crux-api'
124
+ const queryHistoryRecord = createQueryHistoryRecord({ key: CRUX_API_KEY })
75
125
 
76
- const jsonHistory = await queryRecord({ url: 'https://www.github.com/' }) // fetch ALL_FORM_FACTORS
126
+ const jsonHistory = await queryHistoryRecord({ url: 'https://github.com/' }) // fetch ALL_FORM_FACTORS
77
127
  ```
78
128
 
79
- The `jsonHistory` is `null` or an `object` with [queryRecord response body](https://developer.chrome.com/docs/crux/history-api/#response-body), ex:
129
+ The `jsonHistory` is `null` or an `object` with [queryHistoryRecord response body](https://developer.chrome.com/docs/crux/history-api/#response-body), ex:
80
130
 
81
131
  ```json
82
132
  {
@@ -90,28 +140,43 @@ The `jsonHistory` is `null` or an `object` with [queryRecord response body](http
90
140
  {
91
141
  "start": "0.00",
92
142
  "end": "0.10",
93
- "densities": [0.716522216796875, 0.672149658203125, ...]
143
+ "densities": [0.936, 0.9367, 0.9352, ...]
94
144
  },
95
145
  {
96
146
  "start": "0.10",
97
147
  "end": "0.25",
98
- "densities": [0.244537353515625, 0.246917724609375, ...]
148
+ "densities": [0.0599, 0.0593, 0.0609, ...]
99
149
  },
100
150
  {
101
151
  "start": "0.25",
102
- "densities": [0.0389404296875, 0.0809326171875, ...]
103
- }
152
+ "densities": [0.0041, 0.0041, 0.0039, ...]
153
+ },
154
+ { ... }
104
155
  ],
105
156
  "percentilesTimeseries": {
106
- "p75s": ["0.10", "0.12", ...]
157
+ "p75s": ["0.05", "0.05", ...]
107
158
  }
108
159
  },
109
160
  "experimental_time_to_first_byte": { ... },
110
161
  "first_contentful_paint": { ... },
111
- "first_input_delay": { ... },
162
+ "largest_contentful_paint_image_element_render_delay": { ... },
163
+ "largest_contentful_paint_resource_type": { ... },
164
+ "navigation_types": { ... },
165
+ "round_trip_time": { ... },
166
+ "form_factors": { ... },
112
167
  "interaction_to_next_paint": { ... },
113
- "largest_contentful_paint": { ... }
114
- }
168
+ "largest_contentful_paint": { ... },
169
+ "largest_contentful_paint_image_resource_load_delay": { ... },
170
+ "largest_contentful_paint_image_resource_load_duration": { ... },
171
+ "largest_contentful_paint_image_time_to_first_byte": { ... },
172
+ },
173
+ "collectionPeriods": [
174
+ {
175
+ "firstDate": { "year": 2025, "month": 7, "day": 27 },
176
+ "lastDate": { "year": 2025, "month": 8, "day": 23 }
177
+ },
178
+ { ... }
179
+ ]
115
180
  }
116
181
  }
117
182
  ```
@@ -130,8 +195,8 @@ Returns a `queryRecord` function.
130
195
  Fetches CrUX API using [`queryRecord options`](https://developer.chrome.com/docs/crux/api/):
131
196
 
132
197
  - _queryOptions.url_ or _queryOptions.origin_ (**required**) – the main identifier for a record lookup;
133
- - _queryOptions.formFactor_ (optional, defaults to all form factors) - the form factor dimension: `PHONE` | `DESKTOP` | `TABLET`;
134
- - _queryOptions.effectiveConnectionType_ (optional, defaults to all connections) - the effective network class: `4G` | `3G` | `2G` | `slow-2G` | `offline`.
198
+ - _queryOptions.formFactor_ (optional, defaults to all form factors) - the form factor dimension: `PHONE` | `DESKTOP` | `TABLET`.
199
+ - _queryOptions.collectionPeriodCount_ (optional, default is 25) - the number of collection periods to return between 1 and 40
135
200
 
136
201
  Returns a Promise with a raw [`queryRecord` response](https://developer.chrome.com/docs/crux/api/#response-body) or `null` when the data is not found.
137
202
 
@@ -142,7 +207,6 @@ const queryRecord = createQueryRecord({ key: process.env.CRUX_API_KEY })
142
207
  const res = await queryRecord({
143
208
  url: 'https://github.com/marketplace?type=actions',
144
209
  formFactor: 'DESKTOP',
145
- effectiveConnectionType: '4G',
146
210
  })
147
211
 
148
212
  // res -> URL-level data for https://github.com/marketplace
@@ -156,9 +220,7 @@ Returns a function that fetches [CrUX History API using [`queryHistoryRecord opt
156
220
  import { createQueryHistoryRecord } from 'crux-api'
157
221
 
158
222
  const queryHistory = createQueryHistoryRecord({ key: process.env.CRUX_API_KEY })
159
- const res = await queryHistory({
160
- url: 'https://www.github.com/',
161
- })
223
+ const res = await queryHistory({ url: 'https://www.github.com/' })
162
224
  ```
163
225
 
164
226
  ### normalizeUrl(url)
@@ -192,10 +254,7 @@ curl -d url='https://github.com/' \
192
254
  ```json
193
255
  {
194
256
  "record": {
195
- "key": {
196
- "formFactor": "DESKTOP",
197
- "url": "https://github.com/"
198
- },
257
+ "key": { "formFactor": "DESKTOP", "url": "https://github.com/" },
199
258
  "metrics": {
200
259
  "cumulative_layout_shift": {
201
260
  "histogramTimeseries": [
@@ -203,104 +262,53 @@ curl -d url='https://github.com/' \
203
262
  "start": "0.00",
204
263
  "end": "0.10",
205
264
  "densities": [
206
- 0.726043701171875, 0.676971435546875, 0.638519287109375, 0.629058837890625, 0.622161865234375,
207
- 0.656158447265625, 0.688262939453125, 0.73272705078125, 0.791351318359375, 0.845489501953125,
208
- 0.897674560546875, 0.916046142578125, 0.91455078125, 0.91363525390625, 0.913543701171875,
209
- 0.915008544921875, 0.9166259765625, 0.9210205078125, 0.929107666015625, 0.936553955078125,
210
- 0.93804931640625, 0.925628662109375, 0.913299560546875, 0.9024658203125, 0.903533935546875
265
+ 0.9451, 0.9459, 0.9458, 0.9435, 0.9439, 0.9483, 0.9478, 0.9486, 0.9472, 0.9455, 0.9383, 0.9262, 0.8933,
266
+ 0.856, 0.8275, 0.8092, 0.8117, 0.8178, 0.8232, 0.8265, 0.8278, 0.8336, 0.8417, 0.8511, 0.8577
211
267
  ]
212
268
  },
213
269
  {
214
270
  "start": "0.10",
215
271
  "end": "0.25",
216
272
  "densities": [
217
- 0.2373046875, 0.240753173828125, 0.224029541015625, 0.190032958984375, 0.1575927734375, 0.123931884765625,
218
- 0.10748291015625, 0.098846435546875, 0.087677001953125, 0.07757568359375, 0.069122314453125,
219
- 0.065460205078125, 0.064697265625, 0.06402587890625, 0.06298828125, 0.061614990234375, 0.0601806640625,
220
- 0.05560302734375, 0.048614501953125, 0.041778564453125, 0.041229248046875, 0.05340576171875,
221
- 0.0660400390625, 0.07568359375, 0.07342529296875
273
+ 0.0515, 0.0508, 0.051, 0.0529, 0.0524, 0.0485, 0.0491, 0.048, 0.0497, 0.0509, 0.0574, 0.0683, 0.0989,
274
+ 0.1345, 0.1613, 0.179, 0.1756, 0.1696, 0.1636, 0.1602, 0.159, 0.154, 0.1461, 0.1375, 0.1313
222
275
  ]
223
276
  },
224
277
  {
225
278
  "start": "0.25",
226
279
  "densities": [
227
- 0.036651611328125, 0.082275390625, 0.137451171875, 0.180908203125, 0.220245361328125, 0.21990966796875,
228
- 0.204254150390625, 0.168426513671875, 0.1209716796875, 0.076934814453125, 0.033203125, 0.01849365234375,
229
- 0.020751953125, 0.0223388671875, 0.023468017578125, 0.02337646484375, 0.023193359375, 0.02337646484375,
230
- 0.02227783203125, 0.02166748046875, 0.020721435546875, 0.020965576171875, 0.020660400390625,
231
- 0.0218505859375, 0.023040771484375
280
+ 0.0034, 0.0033, 0.0032, 0.0035, 0.0036, 0.0033, 0.0031, 0.0034, 0.0031, 0.0036, 0.0043, 0.0056, 0.0078,
281
+ 0.0096, 0.0112, 0.0118, 0.0128, 0.0125, 0.0132, 0.0133, 0.0132, 0.0124, 0.0123, 0.0114, 0.011
232
282
  ]
233
283
  }
234
284
  ],
235
285
  "percentilesTimeseries": {
236
286
  "p75s": [
237
- "0.10",
238
- "0.11",
239
- "0.12",
240
- "0.14",
241
- "0.18",
242
- "0.17",
243
- "0.14",
244
- "0.10",
245
- "0.08",
246
- "0.07",
247
- "0.06",
248
- "0.06",
249
- "0.06",
250
- "0.06",
251
- "0.06",
252
- "0.06",
253
- "0.06",
254
- "0.06",
255
287
  "0.05",
256
288
  "0.05",
257
- "0.04",
258
289
  "0.05",
259
290
  "0.05",
260
291
  "0.05",
261
- "0.05"
262
- ]
263
- }
264
- },
265
- "experimental_time_to_first_byte": {
266
- "histogramTimeseries": [
267
- {
268
- "start": 0,
269
- "end": 800,
270
- "densities": [
271
- 0.779144287109375, 0.780303955078125, 0.777435302734375, 0.77899169921875, 0.780487060546875,
272
- 0.779144287109375, 0.77862548828125, 0.776763916015625, 0.774810791015625, 0.76995849609375,
273
- 0.765777587890625, 0.75335693359375, 0.741180419921875, 0.73614501953125, 0.732025146484375,
274
- 0.7298583984375, 0.7265625, 0.72662353515625, 0.724853515625, 0.72650146484375, 0.7236328125,
275
- 0.718994140625, 0.717437744140625, 0.71881103515625, 0.721832275390625
276
- ]
277
- },
278
- {
279
- "start": 800,
280
- "end": 1800,
281
- "densities": [
282
- 0.1845703125, 0.184783935546875, 0.187591552734375, 0.186492919921875, 0.186920166015625,
283
- 0.189056396484375, 0.190155029296875, 0.193328857421875, 0.1947021484375, 0.19903564453125,
284
- 0.202911376953125, 0.21380615234375, 0.22515869140625, 0.22967529296875, 0.232208251953125,
285
- 0.23468017578125, 0.23553466796875, 0.236907958984375, 0.237640380859375, 0.2371826171875,
286
- 0.23992919921875, 0.24432373046875, 0.245819091796875, 0.24505615234375, 0.242095947265625
287
- ]
288
- },
289
- {
290
- "start": 1800,
291
- "densities": [
292
- 0.036285400390625, 0.034912109375, 0.03497314453125, 0.034515380859375, 0.0325927734375, 0.03179931640625,
293
- 0.031219482421875, 0.0299072265625, 0.030487060546875, 0.031005859375, 0.03131103515625, 0.0328369140625,
294
- 0.033660888671875, 0.0341796875, 0.0357666015625, 0.03546142578125, 0.03790283203125, 0.036468505859375,
295
- 0.037506103515625, 0.03631591796875, 0.03643798828125, 0.03668212890625, 0.0367431640625, 0.0361328125,
296
- 0.03607177734375
297
- ]
298
- }
299
- ],
300
- "percentilesTimeseries": {
301
- "p75s": [
302
- 748, 749, 752, 752, 751, 752, 755, 757, 761, 768, 778, 796, 814, 821, 826, 832, 832, 834, 836, 836, 838,
303
- 846, 847, 846, 841
292
+ "0.04",
293
+ "0.04",
294
+ "0.04",
295
+ "0.04",
296
+ "0.04",
297
+ "0.05",
298
+ "0.06",
299
+ "0.07",
300
+ "0.08",
301
+ "0.08",
302
+ "0.09",
303
+ "0.08",
304
+ "0.08",
305
+ "0.08",
306
+ "0.08",
307
+ "0.08",
308
+ "0.08",
309
+ "0.08",
310
+ "0.08",
311
+ "0.08"
304
312
  ]
305
313
  }
306
314
  },
@@ -310,118 +318,61 @@ curl -d url='https://github.com/' \
310
318
  "start": 0,
311
319
  "end": 1800,
312
320
  "densities": [
313
- 0.88543701171875, 0.88568115234375, 0.886962890625, 0.889556884765625, 0.8934326171875, 0.89837646484375,
314
- 0.90142822265625, 0.903594970703125, 0.900787353515625, 0.899627685546875, 0.894317626953125,
315
- 0.8936767578125, 0.89227294921875, 0.89227294921875, 0.8905029296875, 0.891815185546875, 0.88812255859375,
316
- 0.88897705078125, 0.888946533203125, 0.888458251953125, 0.889923095703125, 0.88800048828125,
317
- 0.88433837890625, 0.88311767578125, 0.880706787109375
321
+ 0.8693, 0.8688, 0.8704, 0.8652, 0.866, 0.8617, 0.8647, 0.8692, 0.8702, 0.8697, 0.8685, 0.8702, 0.8737,
322
+ 0.8726, 0.8727, 0.8725, 0.8671, 0.8653, 0.863, 0.8622, 0.8642, 0.8659, 0.8648, 0.8599, 0.8552
318
323
  ]
319
324
  },
320
325
  {
321
326
  "start": 1800,
322
327
  "end": 3000,
323
328
  "densities": [
324
- 0.07373046875, 0.07440185546875, 0.072662353515625, 0.0693359375, 0.0662841796875, 0.063446044921875,
325
- 0.061248779296875, 0.06024169921875, 0.061920166015625, 0.06378173828125, 0.06536865234375,
326
- 0.066314697265625, 0.0675048828125, 0.066741943359375, 0.06787109375, 0.0675048828125, 0.0699462890625,
327
- 0.06915283203125, 0.068267822265625, 0.06878662109375, 0.068267822265625, 0.070343017578125,
328
- 0.072509765625, 0.072418212890625, 0.073883056640625
329
+ 0.0841, 0.0841, 0.0842, 0.087, 0.088, 0.0905, 0.0896, 0.0861, 0.085, 0.0853, 0.0853, 0.0837, 0.0823,
330
+ 0.0815, 0.0818, 0.0818, 0.0852, 0.0866, 0.087, 0.087, 0.0865, 0.0857, 0.0873, 0.0895, 0.0924
329
331
  ]
330
332
  },
331
333
  {
332
334
  "start": 3000,
333
335
  "densities": [
334
- 0.04083251953125, 0.0399169921875, 0.040374755859375, 0.041107177734375, 0.040283203125,
335
- 0.038177490234375, 0.037322998046875, 0.036163330078125, 0.03729248046875, 0.036590576171875,
336
- 0.040313720703125, 0.040008544921875, 0.04022216796875, 0.040985107421875, 0.0416259765625,
337
- 0.040679931640625, 0.04193115234375, 0.0418701171875, 0.04278564453125, 0.042755126953125,
338
- 0.04180908203125, 0.041656494140625, 0.04315185546875, 0.044464111328125, 0.04541015625
336
+ 0.0466, 0.0471, 0.0455, 0.0478, 0.046, 0.0479, 0.0457, 0.0448, 0.0448, 0.045, 0.0462, 0.0461, 0.044,
337
+ 0.0459, 0.0455, 0.0457, 0.0477, 0.0481, 0.05, 0.0507, 0.0493, 0.0484, 0.0479, 0.0506, 0.0524
339
338
  ]
340
339
  }
341
340
  ],
342
341
  "percentilesTimeseries": {
343
342
  "p75s": [
344
- 1221, 1216, 1219, 1205, 1186, 1173, 1158, 1157, 1165, 1175, 1190, 1204, 1214, 1217, 1222, 1227, 1231, 1237,
345
- 1237, 1237, 1236, 1250, 1263, 1272, 1276
343
+ 1340, 1341, 1342, 1360, 1364, 1366, 1359, 1337, 1328, 1324, 1325, 1324, 1315, 1310, 1306, 1297, 1313, 1327,
344
+ 1335, 1341, 1329, 1328, 1337, 1352, 1380
346
345
  ]
347
346
  }
348
347
  },
349
- "first_input_delay": {
350
- "histogramTimeseries": [
351
- {
352
- "start": 0,
353
- "end": 100,
354
- "densities": [
355
- 0.970855712890625, 0.971649169921875, 0.97064208984375, 0.969085693359375, 0.96905517578125,
356
- 0.968017578125, 0.969146728515625, 0.96868896484375, 0.9720458984375, 0.971710205078125, 0.9720458984375,
357
- 0.97308349609375, 0.974609375, 0.9749755859375, 0.974090576171875, 0.97412109375, 0.9752197265625,
358
- 0.97528076171875, 0.9747314453125, 0.973236083984375, 0.973846435546875, 0.97296142578125,
359
- 0.974884033203125, 0.97357177734375, 0.975128173828125
360
- ]
361
- },
362
- {
363
- "start": 100,
364
- "end": 300,
365
- "densities": [
366
- 0.01763916015625, 0.01641845703125, 0.017730712890625, 0.0181884765625, 0.018218994140625,
367
- 0.019622802734375, 0.01849365234375, 0.019256591796875, 0.0172119140625, 0.017608642578125,
368
- 0.017059326171875, 0.016876220703125, 0.015350341796875, 0.014984130859375, 0.0159912109375,
369
- 0.016021728515625, 0.014495849609375, 0.0145263671875, 0.014739990234375, 0.0159912109375,
370
- 0.01568603515625, 0.016204833984375, 0.014739990234375, 0.01617431640625, 0.01416015625
371
- ]
372
- },
373
- {
374
- "start": 300,
375
- "densities": [
376
- 0.011505126953125, 0.011932373046875, 0.011627197265625, 0.012725830078125, 0.012725830078125,
377
- 0.012359619140625, 0.012359619140625, 0.012054443359375, 0.0107421875, 0.01068115234375,
378
- 0.010894775390625, 0.010040283203125, 0.010040283203125, 0.010040283203125, 0.009918212890625,
379
- 0.009857177734375, 0.010284423828125, 0.01019287109375, 0.010528564453125, 0.010772705078125,
380
- 0.010467529296875, 0.010833740234375, 0.0103759765625, 0.01025390625, 0.010711669921875
381
- ]
382
- }
383
- ],
384
- "percentilesTimeseries": {
385
- "p75s": [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]
386
- }
387
- },
388
348
  "interaction_to_next_paint": {
389
349
  "histogramTimeseries": [
390
350
  {
391
351
  "start": 0,
392
352
  "end": 200,
393
353
  "densities": [
394
- 0.9437255859375, 0.944244384765625, 0.94207763671875, 0.938720703125, 0.936737060546875,
395
- 0.936126708984375, 0.93768310546875, 0.93988037109375, 0.94134521484375, 0.9393310546875, 0.9384765625,
396
- 0.939208984375, 0.937744140625, 0.9365234375, 0.937286376953125, 0.937896728515625, 0.937591552734375,
397
- 0.93682861328125, 0.9373779296875, 0.93505859375, 0.9368896484375, 0.9373779296875, 0.937255859375,
398
- 0.938629150390625, 0.940155029296875
354
+ 0.9261, 0.9262, 0.929, 0.9341, 0.9369, 0.9378, 0.9415, 0.9408, 0.9414, 0.942, 0.9422, 0.9435, 0.9443,
355
+ 0.9463, 0.9492, 0.9509, 0.9539, 0.9549, 0.955, 0.9561, 0.9565, 0.9561, 0.9565, 0.9532, 0.9504
399
356
  ]
400
357
  },
401
358
  {
402
359
  "start": 200,
403
360
  "end": 500,
404
361
  "densities": [
405
- 0.03204345703125, 0.032135009765625, 0.034271240234375, 0.0360107421875, 0.0382080078125, 0.0384521484375,
406
- 0.038360595703125, 0.037994384765625, 0.036376953125, 0.037841796875, 0.038848876953125, 0.03875732421875,
407
- 0.039947509765625, 0.04107666015625, 0.040435791015625, 0.039337158203125, 0.039947509765625,
408
- 0.040313720703125, 0.04034423828125, 0.04168701171875, 0.0406494140625, 0.03924560546875,
409
- 0.039581298828125, 0.039459228515625, 0.03814697265625
362
+ 0.0536, 0.0536, 0.0518, 0.0471, 0.045, 0.0427, 0.0392, 0.0398, 0.0389, 0.0384, 0.0392, 0.039, 0.0388,
363
+ 0.0391, 0.0372, 0.0362, 0.0346, 0.0329, 0.0335, 0.0318, 0.032, 0.0321, 0.0314, 0.033, 0.0341
410
364
  ]
411
365
  },
412
366
  {
413
367
  "start": 500,
414
368
  "densities": [
415
- 0.02423095703125, 0.02362060546875, 0.023651123046875, 0.0252685546875, 0.025054931640625,
416
- 0.025421142578125, 0.023956298828125, 0.022125244140625, 0.02227783203125, 0.0228271484375,
417
- 0.022674560546875, 0.02203369140625, 0.022308349609375, 0.02239990234375, 0.02227783203125,
418
- 0.02276611328125, 0.0224609375, 0.022857666015625, 0.02227783203125, 0.02325439453125, 0.0224609375,
419
- 0.02337646484375, 0.023162841796875, 0.02191162109375, 0.021697998046875
369
+ 0.0203, 0.0202, 0.0193, 0.0187, 0.0182, 0.0194, 0.0193, 0.0194, 0.0196, 0.0196, 0.0186, 0.0174, 0.0168,
370
+ 0.0146, 0.0136, 0.0129, 0.0115, 0.0122, 0.0115, 0.0121, 0.0115, 0.0118, 0.0121, 0.0138, 0.0154
420
371
  ]
421
372
  }
422
373
  ],
423
374
  "percentilesTimeseries": {
424
- "p75s": [61, 62, 63, 64, 65, 66, 66, 66, 66, 67, 68, 70, 72, 73, 73, 72, 72, 73, 72, 71, 70, 70, 69, 69, 69]
375
+ "p75s": [79, 78, 78, 75, 71, 69, 67, 67, 67, 67, 67, 67, 67, 67, 66, 64, 63, 63, 62, 63, 63, 63, 62, 62, 62]
425
376
  }
426
377
  },
427
378
  "largest_contentful_paint": {
@@ -430,737 +381,220 @@ curl -d url='https://github.com/' \
430
381
  "start": 0,
431
382
  "end": 2500,
432
383
  "densities": [
433
- 0.86895751953125, 0.850921630859375, 0.834320068359375, 0.818145751953125, 0.802490234375,
434
- 0.796417236328125, 0.79620361328125, 0.809417724609375, 0.830078125, 0.850067138671875, 0.87017822265625,
435
- 0.87786865234375, 0.87628173828125, 0.875823974609375, 0.875335693359375, 0.867889404296875,
436
- 0.869781494140625, 0.87115478515625, 0.869476318359375, 0.874481201171875, 0.877227783203125,
437
- 0.884185791015625, 0.890472412109375, 0.895751953125, 0.896820068359375
384
+ 0.8137, 0.8162, 0.8207, 0.821, 0.8292, 0.8457, 0.8513, 0.8548, 0.8529, 0.8538, 0.8622, 0.8726, 0.8638,
385
+ 0.8423, 0.8222, 0.8047, 0.8033, 0.7977, 0.7969, 0.7948, 0.7952, 0.7885, 0.784, 0.7786, 0.7738
438
386
  ]
439
387
  },
440
388
  {
441
389
  "start": 2500,
442
390
  "end": 4000,
443
391
  "densities": [
444
- 0.08221435546875, 0.09649658203125, 0.10797119140625, 0.11907958984375, 0.130035400390625,
445
- 0.1356201171875, 0.135101318359375, 0.12530517578125, 0.110565185546875, 0.095550537109375,
446
- 0.07904052734375, 0.072845458984375, 0.074127197265625, 0.0743408203125, 0.07452392578125,
447
- 0.080596923828125, 0.07769775390625, 0.078460693359375, 0.0782470703125, 0.074798583984375,
448
- 0.07415771484375, 0.0692138671875, 0.06475830078125, 0.0615234375, 0.0595703125
392
+ 0.1206, 0.1185, 0.1154, 0.1168, 0.1094, 0.0982, 0.0947, 0.09, 0.0931, 0.0924, 0.0854, 0.078, 0.0841,
393
+ 0.0985, 0.1126, 0.1252, 0.1261, 0.1278, 0.1282, 0.1294, 0.129, 0.1317, 0.1368, 0.1391, 0.1435
449
394
  ]
450
395
  },
451
396
  {
452
397
  "start": 4000,
453
398
  "densities": [
454
- 0.048828125, 0.052581787109375, 0.057708740234375, 0.062774658203125, 0.067474365234375,
455
- 0.067962646484375, 0.068695068359375, 0.065277099609375, 0.059356689453125, 0.05438232421875, 0.05078125,
456
- 0.049285888671875, 0.049591064453125, 0.049835205078125, 0.050140380859375, 0.051513671875,
457
- 0.052520751953125, 0.050384521484375, 0.052276611328125, 0.05072021484375, 0.048614501953125,
458
- 0.046600341796875, 0.044769287109375, 0.042724609375, 0.043609619140625
399
+ 0.0657, 0.0653, 0.0638, 0.0621, 0.0614, 0.0561, 0.054, 0.0552, 0.054, 0.0538, 0.0524, 0.0494, 0.0521,
400
+ 0.0591, 0.0651, 0.0701, 0.0706, 0.0745, 0.0749, 0.0758, 0.0758, 0.0798, 0.0792, 0.0823, 0.0827
459
401
  ]
460
402
  }
461
403
  ],
462
404
  "percentilesTimeseries": {
463
405
  "p75s": [
464
- 1815, 1953, 2056, 2148, 2236, 2271, 2273, 2200, 2068, 1918, 1757, 1695, 1715, 1719, 1726, 1772, 1760, 1760,
465
- 1762, 1726, 1701, 1657, 1618, 1579, 1556
406
+ 2172, 2157, 2134, 2137, 2075, 1964, 1931, 1893, 1915, 1910, 1842, 1766, 1825, 1967, 2095, 2201, 2218, 2234,
407
+ 2245, 2257, 2253, 2282, 2317, 2338, 2380
466
408
  ]
467
409
  }
468
- }
469
- },
470
- "collectionPeriods": [
471
- {
472
- "firstDate": {
473
- "year": 2023,
474
- "month": 3,
475
- "day": 26
476
- },
477
- "lastDate": {
478
- "year": 2023,
479
- "month": 4,
480
- "day": 22
481
- }
482
410
  },
483
- {
484
- "firstDate": {
485
- "year": 2023,
486
- "month": 4,
487
- "day": 2
488
- },
489
- "lastDate": {
490
- "year": 2023,
491
- "month": 4,
492
- "day": 29
493
- }
494
- },
495
- {
496
- "firstDate": {
497
- "year": 2023,
498
- "month": 4,
499
- "day": 9
500
- },
501
- "lastDate": {
502
- "year": 2023,
503
- "month": 5,
504
- "day": 6
505
- }
506
- },
507
- {
508
- "firstDate": {
509
- "year": 2023,
510
- "month": 4,
511
- "day": 16
512
- },
513
- "lastDate": {
514
- "year": 2023,
515
- "month": 5,
516
- "day": 13
517
- }
518
- },
519
- {
520
- "firstDate": {
521
- "year": 2023,
522
- "month": 4,
523
- "day": 23
524
- },
525
- "lastDate": {
526
- "year": 2023,
527
- "month": 5,
528
- "day": 20
529
- }
530
- },
531
- {
532
- "firstDate": {
533
- "year": 2023,
534
- "month": 4,
535
- "day": 30
536
- },
537
- "lastDate": {
538
- "year": 2023,
539
- "month": 5,
540
- "day": 27
541
- }
542
- },
543
- {
544
- "firstDate": {
545
- "year": 2023,
546
- "month": 5,
547
- "day": 7
548
- },
549
- "lastDate": {
550
- "year": 2023,
551
- "month": 6,
552
- "day": 3
553
- }
554
- },
555
- {
556
- "firstDate": {
557
- "year": 2023,
558
- "month": 5,
559
- "day": 14
560
- },
561
- "lastDate": {
562
- "year": 2023,
563
- "month": 6,
564
- "day": 10
565
- }
566
- },
567
- {
568
- "firstDate": {
569
- "year": 2023,
570
- "month": 5,
571
- "day": 21
572
- },
573
- "lastDate": {
574
- "year": 2023,
575
- "month": 6,
576
- "day": 17
577
- }
578
- },
579
- {
580
- "firstDate": {
581
- "year": 2023,
582
- "month": 5,
583
- "day": 28
584
- },
585
- "lastDate": {
586
- "year": 2023,
587
- "month": 6,
588
- "day": 24
589
- }
590
- },
591
- {
592
- "firstDate": {
593
- "year": 2023,
594
- "month": 6,
595
- "day": 4
596
- },
597
- "lastDate": {
598
- "year": 2023,
599
- "month": 7,
600
- "day": 1
601
- }
602
- },
603
- {
604
- "firstDate": {
605
- "year": 2023,
606
- "month": 6,
607
- "day": 11
608
- },
609
- "lastDate": {
610
- "year": 2023,
611
- "month": 7,
612
- "day": 8
613
- }
614
- },
615
- {
616
- "firstDate": {
617
- "year": 2023,
618
- "month": 6,
619
- "day": 18
620
- },
621
- "lastDate": {
622
- "year": 2023,
623
- "month": 7,
624
- "day": 15
625
- }
626
- },
627
- {
628
- "firstDate": {
629
- "year": 2023,
630
- "month": 6,
631
- "day": 25
632
- },
633
- "lastDate": {
634
- "year": 2023,
635
- "month": 7,
636
- "day": 22
637
- }
638
- },
639
- {
640
- "firstDate": {
641
- "year": 2023,
642
- "month": 7,
643
- "day": 2
644
- },
645
- "lastDate": {
646
- "year": 2023,
647
- "month": 7,
648
- "day": 29
649
- }
650
- },
651
- {
652
- "firstDate": {
653
- "year": 2023,
654
- "month": 7,
655
- "day": 9
656
- },
657
- "lastDate": {
658
- "year": 2023,
659
- "month": 8,
660
- "day": 5
661
- }
662
- },
663
- {
664
- "firstDate": {
665
- "year": 2023,
666
- "month": 7,
667
- "day": 16
668
- },
669
- "lastDate": {
670
- "year": 2023,
671
- "month": 8,
672
- "day": 12
673
- }
674
- },
675
- {
676
- "firstDate": {
677
- "year": 2023,
678
- "month": 7,
679
- "day": 23
680
- },
681
- "lastDate": {
682
- "year": 2023,
683
- "month": 8,
684
- "day": 19
685
- }
686
- },
687
- {
688
- "firstDate": {
689
- "year": 2023,
690
- "month": 7,
691
- "day": 30
692
- },
693
- "lastDate": {
694
- "year": 2023,
695
- "month": 8,
696
- "day": 26
697
- }
698
- },
699
- {
700
- "firstDate": {
701
- "year": 2023,
702
- "month": 8,
703
- "day": 6
704
- },
705
- "lastDate": {
706
- "year": 2023,
707
- "month": 9,
708
- "day": 2
709
- }
710
- },
711
- {
712
- "firstDate": {
713
- "year": 2023,
714
- "month": 8,
715
- "day": 13
716
- },
717
- "lastDate": {
718
- "year": 2023,
719
- "month": 9,
720
- "day": 9
721
- }
722
- },
723
- {
724
- "firstDate": {
725
- "year": 2023,
726
- "month": 8,
727
- "day": 20
728
- },
729
- "lastDate": {
730
- "year": 2023,
731
- "month": 9,
732
- "day": 16
411
+ "largest_contentful_paint_image_element_render_delay": {
412
+ "percentilesTimeseries": {
413
+ "p75s": [
414
+ 331, 323, 313, 309, 273, 253, 251, 251, 258, 263, 258, 254, 256, 265, 280, 316, 320, 322, 320, 318, 335,
415
+ 374, 385, 388, 389
416
+ ]
733
417
  }
734
418
  },
735
- {
736
- "firstDate": {
737
- "year": 2023,
738
- "month": 8,
739
- "day": 27
740
- },
741
- "lastDate": {
742
- "year": 2023,
743
- "month": 9,
744
- "day": 23
419
+ "largest_contentful_paint_image_resource_load_delay": {
420
+ "percentilesTimeseries": {
421
+ "p75s": [
422
+ 203, 189, 185, 182, 185, 187, 188, 188, 187, 178, 180, 185, 190, 207, 231, 328, 344, 357, 373, 392, 411,
423
+ 583, 592, 430, 292
424
+ ]
745
425
  }
746
426
  },
747
- {
748
- "firstDate": {
749
- "year": 2023,
750
- "month": 9,
751
- "day": 3
752
- },
753
- "lastDate": {
754
- "year": 2023,
755
- "month": 9,
756
- "day": 30
427
+ "largest_contentful_paint_image_resource_load_duration": {
428
+ "percentilesTimeseries": {
429
+ "p75s": [
430
+ 139, 142, 144, 142, 173, 176, 176, 177, 171, 176, 188, 183, 179, 172, 151, 137, 139, 142, 145, 150, 151,
431
+ 145, 142, 143, 146
432
+ ]
757
433
  }
758
434
  },
759
- {
760
- "firstDate": {
761
- "year": 2023,
762
- "month": 9,
763
- "day": 10
764
- },
765
- "lastDate": {
766
- "year": 2023,
767
- "month": 10,
768
- "day": 7
769
- }
770
- }
771
- ]
772
- }
773
- }
774
- ```
775
-
776
- </details>
777
-
778
- <details>
779
- <summary>✅ 200: URL-level CrUX API data</summary><br>
780
-
781
- ```bash
782
- curl -d url='https://github.com/marketplace?type=actions' \
783
- -d effectiveConnectionType=4G \
784
- -d formFactor=DESKTOP \
785
- 'https://chromeuxreport.googleapis.com/v1/records:queryRecord?key=CRUX_API_KEY'
786
- ```
787
-
788
- ```json
789
- {
790
- "record": {
791
- "key": {
792
- "formFactor": "DESKTOP",
793
- "effectiveConnectionType": "4G",
794
- "url": "https://github.com/marketplace"
795
- },
796
- "metrics": {
797
- "cumulative_layout_shift": {
798
- "histogram": [
799
- {
800
- "start": "0.00",
801
- "end": "0.10",
802
- "density": 0.9430604982206409
435
+ "navigation_types": {
436
+ "fractionTimeseries": {
437
+ "back_forward_cache": {
438
+ "fractions": [
439
+ 0.0074, 0.0067, 0.0065, 0.0066, 0.0067, 0.0086, 0.0095, 0.0113, 0.0121, 0.0101, 0.0091, 0.0069, 0.0061,
440
+ 0.0062, 0.006, 0.0056, 0.0063, 0.0071, 0.0072, 0.0084, 0.0092, 0.0099, 0.0097, 0.0099, 0.0106
441
+ ]
803
442
  },
804
- {
805
- "start": "0.10",
806
- "end": "0.25",
807
- "density": 0.020804817957842878
443
+ "prerender": {
444
+ "fractions": [
445
+ 0.2518, 0.2512, 0.2497, 0.2488, 0.2483, 0.2486, 0.2509, 0.2532, 0.2552, 0.2575, 0.2571, 0.2577, 0.2581,
446
+ 0.2585, 0.2584, 0.2597, 0.261, 0.2618, 0.2607, 0.2571, 0.2514, 0.2497, 0.2518, 0.2554, 0.2591
447
+ ]
808
448
  },
809
- {
810
- "start": "0.25",
811
- "density": 0.03613468382151657
449
+ "navigate": {
450
+ "fractions": [
451
+ 0.6292, 0.6319, 0.6335, 0.6335, 0.6342, 0.6339, 0.6315, 0.6307, 0.6292, 0.6288, 0.6294, 0.6311, 0.6302,
452
+ 0.6305, 0.631, 0.6315, 0.6305, 0.6288, 0.6292, 0.6305, 0.6367, 0.6402, 0.6392, 0.6359, 0.6328
453
+ ]
454
+ },
455
+ "navigate_cache": {
456
+ "fractions": [
457
+ 0.0014, 0.0013, 0.0012, 0.0016, 0.0012, 0.0012, 0.0016, 0.0013, 0.0013, 0.0015, 0.0017, 0.0016, 0.0014,
458
+ 0.0013, 0.0014, 0.0019, 0.0013, 0.0015, 0.0018, 0.0016, 0.0019, 0.0013, 0.0016, 0.0015, 0.0014
459
+ ]
460
+ },
461
+ "reload": {
462
+ "fractions": [
463
+ 0.017, 0.0165, 0.0169, 0.0168, 0.0169, 0.0167, 0.0169, 0.0164, 0.0166, 0.0166, 0.0164, 0.016, 0.0161,
464
+ 0.0161, 0.016, 0.0155, 0.0159, 0.0164, 0.0166, 0.0171, 0.0164, 0.0164, 0.0165, 0.0164, 0.0165
465
+ ]
466
+ },
467
+ "restore": {
468
+ "fractions": [
469
+ 0.0043, 0.0038, 0.0044, 0.0045, 0.0046, 0.0042, 0.0045, 0.0042, 0.0042, 0.0044, 0.0045, 0.0039, 0.0046,
470
+ 0.0042, 0.0045, 0.0042, 0.004, 0.0041, 0.0039, 0.0038, 0.0042, 0.0036, 0.0037, 0.0041, 0.004
471
+ ]
472
+ },
473
+ "back_forward": {
474
+ "fractions": [
475
+ 0.0888, 0.0885, 0.0878, 0.0881, 0.088, 0.0868, 0.085, 0.0829, 0.0813, 0.081, 0.0816, 0.0827, 0.0835,
476
+ 0.0832, 0.0828, 0.0813, 0.081, 0.0802, 0.0804, 0.0814, 0.0802, 0.0789, 0.0774, 0.0767, 0.0756
477
+ ]
812
478
  }
813
- ],
814
- "percentiles": {
815
- "p75": "0.02"
816
479
  }
817
480
  },
818
481
  "experimental_time_to_first_byte": {
819
- "histogram": [
482
+ "histogramTimeseries": [
820
483
  {
821
484
  "start": 0,
822
485
  "end": 800,
823
- "density": 0.9393059587999442
486
+ "densities": [
487
+ 0.6456, 0.6462, 0.6443, 0.6345, 0.6327, 0.6346, 0.6437, 0.6608, 0.6692, 0.6764, 0.6684, 0.6564, 0.6508,
488
+ 0.6455, 0.6453, 0.6514, 0.6416, 0.6308, 0.6274, 0.6247, 0.6327, 0.6358, 0.6285, 0.6181, 0.5995
489
+ ]
824
490
  },
825
491
  {
826
492
  "start": 800,
827
493
  "end": 1800,
828
- "density": 0.05378128024332917
829
- },
830
- {
831
- "start": 1800,
832
- "density": 0.006912760956726073
833
- }
834
- ],
835
- "percentiles": {
836
- "p75": 550
837
- }
838
- },
839
- "first_contentful_paint": {
840
- "histogram": [
841
- {
842
- "start": 0,
843
- "end": 1800,
844
- "density": 0.9731800766283532
494
+ "densities": [
495
+ 0.3051, 0.3048, 0.3066, 0.3142, 0.3122, 0.3088, 0.2989, 0.2833, 0.2767, 0.2712, 0.2774, 0.2891, 0.2949,
496
+ 0.2974, 0.2941, 0.2867, 0.2921, 0.3005, 0.3038, 0.305, 0.3, 0.2968, 0.304, 0.3119, 0.3298
497
+ ]
845
498
  },
846
499
  {
847
500
  "start": 1800,
848
- "end": 3000,
849
- "density": 0.017651888341543534
850
- },
851
- {
852
- "start": 3000,
853
- "density": 0.009168035030104028
854
- }
855
- ],
856
- "percentiles": {
857
- "p75": 809
858
- }
859
- },
860
- "first_input_delay": {
861
- "histogram": [
862
- {
863
- "start": 0,
864
- "end": 100,
865
- "density": 0.9936164307521526
866
- },
867
- {
868
- "start": 100,
869
- "end": 300,
870
- "density": 0.004579517069109083
871
- },
872
- {
873
- "start": 300,
874
- "density": 0.0018040521787399426
875
- }
876
- ],
877
- "percentiles": {
878
- "p75": 3
879
- }
880
- },
881
- "interaction_to_next_paint": {
882
- "histogram": [
883
- {
884
- "start": 0,
885
- "end": 200,
886
- "density": 0.9759848893685868
887
- },
888
- {
889
- "start": 200,
890
- "end": 500,
891
- "density": 0.014301133297355571
892
- },
893
- {
894
- "start": 500,
895
- "density": 0.009713977334052826
896
- }
897
- ],
898
- "percentiles": {
899
- "p75": 50
900
- }
901
- },
902
- "largest_contentful_paint": {
903
- "histogram": [
904
- {
905
- "start": 0,
906
- "end": 2500,
907
- "density": 0.9798854493386074
908
- },
909
- {
910
- "start": 2500,
911
- "end": 4000,
912
- "density": 0.012886949406791222
913
- },
914
- {
915
- "start": 4000,
916
- "density": 0.007227601254602516
917
- }
918
- ],
919
- "percentiles": {
920
- "p75": 895
921
- }
922
- }
923
- },
924
- "collectionPeriod": {
925
- "firstDate": {
926
- "year": 2023,
927
- "month": 9,
928
- "day": 15
929
- },
930
- "lastDate": {
931
- "year": 2023,
932
- "month": 10,
933
- "day": 12
934
- }
935
- }
936
- },
937
- "urlNormalizationDetails": {
938
- "originalUrl": "https://github.com/marketplace?type=actions",
939
- "normalizedUrl": "https://github.com/marketplace"
940
- }
941
- }
942
- ```
943
-
944
- </details>
945
-
946
- <details>
947
- <summary>✅ 200: Origin-level CrUX API data</summary><br>
948
-
949
- ```bash
950
- curl -d origin='https://github.com' \
951
- -d formFactor=PHONE \
952
- 'https://chromeuxreport.googleapis.com/v1/records:queryRecord?key=CRUX_API_KEY'
953
- ```
954
-
955
- ```json
956
- {
957
- "record": {
958
- "key": {
959
- "formFactor": "PHONE",
960
- "origin": "https://github.com"
961
- },
962
- "metrics": {
963
- "first_input_delay": {
964
- "histogram": [
965
- {
966
- "start": 0,
967
- "end": 100,
968
- "density": 0.9498680738786286
969
- },
970
- {
971
- "start": 100,
972
- "end": 300,
973
- "density": 0.03430079155672826
974
- },
975
- {
976
- "start": 300,
977
- "density": 0.015831134564643756
978
- }
979
- ],
980
- "percentiles": {
981
- "p75": 17
982
- }
983
- },
984
- "interaction_to_next_paint": {
985
- "histogram": [
986
- {
987
- "start": 0,
988
- "end": 200,
989
- "density": 0.6478405315614636
990
- },
991
- {
992
- "start": 200,
993
- "end": 500,
994
- "density": 0.24584717607973486
995
- },
996
- {
997
- "start": 500,
998
- "density": 0.10631229235880371
999
- }
1000
- ],
1001
- "percentiles": {
1002
- "p75": 272
1003
- }
1004
- },
1005
- "largest_contentful_paint": {
1006
- "histogram": [
1007
- {
1008
- "start": 0,
1009
- "end": 2500,
1010
- "density": 0.7900432900432863
1011
- },
1012
- {
1013
- "start": 2500,
1014
- "end": 4000,
1015
- "density": 0.13528138528138467
1016
- },
1017
- {
1018
- "start": 4000,
1019
- "density": 0.0746753246753239
501
+ "densities": [
502
+ 0.0493, 0.049, 0.049, 0.0513, 0.0551, 0.0565, 0.0574, 0.0559, 0.0541, 0.0525, 0.0541, 0.0544, 0.0543,
503
+ 0.057, 0.0606, 0.0619, 0.0663, 0.0687, 0.0688, 0.0703, 0.0673, 0.0674, 0.0675, 0.07, 0.0706
504
+ ]
1020
505
  }
1021
506
  ],
1022
- "percentiles": {
1023
- "p75": 2312
507
+ "percentilesTimeseries": {
508
+ "p75s": [
509
+ 948, 948, 951, 965, 969, 972, 964, 941, 929, 919, 928, 944, 952, 958, 959, 952, 966, 979, 985, 989, 979,
510
+ 973, 984, 997, 1022
511
+ ]
1024
512
  }
1025
513
  },
1026
- "cumulative_layout_shift": {
1027
- "histogram": [
1028
- {
1029
- "start": "0.00",
1030
- "end": "0.10",
1031
- "density": 0.8527302813017104
1032
- },
1033
- {
1034
- "start": "0.10",
1035
- "end": "0.25",
1036
- "density": 0.09817981246552682
1037
- },
1038
- {
1039
- "start": "0.25",
1040
- "density": 0.04908990623276335
1041
- }
1042
- ],
1043
- "percentiles": {
1044
- "p75": "0.02"
514
+ "largest_contentful_paint_image_time_to_first_byte": {
515
+ "percentilesTimeseries": {
516
+ "p75s": [
517
+ 1089, 1111, 1127, 1150, 1094, 1047, 1038, 1031, 1032, 1012, 1005, 1009, 1009, 1028, 1048, 1065, 1082, 1101,
518
+ 1107, 1114, 1103, 1056, 1065, 1103, 1150
519
+ ]
1045
520
  }
1046
521
  },
1047
- "experimental_time_to_first_byte": {
1048
- "histogram": [
1049
- {
1050
- "start": 0,
1051
- "end": 800,
1052
- "density": 0.6018518518518505
1053
- },
1054
- {
1055
- "start": 800,
1056
- "end": 1800,
1057
- "density": 0.3312757201646084
522
+ "largest_contentful_paint_resource_type": {
523
+ "fractionTimeseries": {
524
+ "image": {
525
+ "fractions": [
526
+ 0.1295, 0.1312, 0.1352, 0.1377, 0.2061, 0.3335, 0.3686, 0.3699, 0.324, 0.3144, 0.3984, 0.5194, 0.5014,
527
+ 0.3875, 0.2758, 0.1556, 0.1529, 0.1501, 0.1482, 0.1469, 0.1462, 0.1563, 0.1572, 0.1513, 0.1471
528
+ ]
1058
529
  },
1059
- {
1060
- "start": 1800,
1061
- "density": 0.0668724279835391
530
+ "text": {
531
+ "fractions": [
532
+ 0.8705, 0.8687, 0.8648, 0.8623, 0.7939, 0.6664, 0.6314, 0.6301, 0.676, 0.6855, 0.6016, 0.4806, 0.4986,
533
+ 0.6125, 0.7242, 0.8443, 0.8471, 0.8499, 0.8518, 0.853, 0.8538, 0.8437, 0.8428, 0.8486, 0.8529
534
+ ]
1062
535
  }
1063
- ],
1064
- "percentiles": {
1065
- "p75": 1039
1066
536
  }
1067
537
  },
1068
- "first_contentful_paint": {
1069
- "histogram": [
538
+ "round_trip_time": {
539
+ "histogramTimeseries": [
1070
540
  {
1071
541
  "start": 0,
1072
- "end": 1800,
1073
- "density": 0.7165570175438571
542
+ "end": 75,
543
+ "densities": [
544
+ 0.472, 0.4757, 0.4798, 0.482, 0.4855, 0.4872, 0.4922, 0.4981, 0.5012, 0.5042, 0.5014, 0.4997, 0.4982,
545
+ 0.4954, 0.4921, 0.4908, 0.4887, 0.4839, 0.4748, 0.4628, 0.4653, 0.4737, 0.4846, 0.4928, 0.496
546
+ ]
1074
547
  },
1075
548
  {
1076
- "start": 1800,
1077
- "end": 3000,
1078
- "density": 0.1781798245614029
549
+ "start": 75,
550
+ "end": 275,
551
+ "densities": [
552
+ 0.4313, 0.4283, 0.4261, 0.4205, 0.4188, 0.4163, 0.4133, 0.4113, 0.4105, 0.4083, 0.4098, 0.4108, 0.411,
553
+ 0.4119, 0.416, 0.4167, 0.417, 0.4211, 0.4276, 0.4354, 0.4348, 0.4299, 0.42, 0.414, 0.412
554
+ ]
1079
555
  },
1080
556
  {
1081
- "start": 3000,
1082
- "density": 0.10526315789473623
557
+ "start": 275,
558
+ "densities": [
559
+ 0.0966, 0.096, 0.0941, 0.0975, 0.0957, 0.0965, 0.0946, 0.0905, 0.0883, 0.0875, 0.0888, 0.0895, 0.0908,
560
+ 0.0927, 0.0919, 0.0925, 0.0943, 0.095, 0.0976, 0.1018, 0.0999, 0.0964, 0.0954, 0.0932, 0.092
561
+ ]
1083
562
  }
1084
563
  ],
1085
- "percentiles": {
1086
- "p75": 1934
564
+ "percentilesTimeseries": {
565
+ "p75s": [
566
+ 152, 151, 150, 150, 150, 150, 147, 144, 143, 141, 143, 143, 144, 144, 145, 145, 146, 147, 150, 155, 154,
567
+ 151, 147, 145, 144
568
+ ]
1087
569
  }
1088
570
  }
1089
571
  },
1090
- "collectionPeriod": {
1091
- "firstDate": {
1092
- "year": 2023,
1093
- "month": 9,
1094
- "day": 15
1095
- },
1096
- "lastDate": {
1097
- "year": 2023,
1098
- "month": 10,
1099
- "day": 12
1100
- }
1101
- }
1102
- }
1103
- }
1104
- ```
1105
-
1106
- </details>
1107
-
1108
- <details>
1109
- <summary>🛑 400 INVALID_ARGUMENT: API key not valid, please pass a valid API key</summary><br>
1110
-
1111
- ```bash
1112
- curl -d origin='https://github.com' \
1113
- 'https://chromeuxreport.googleapis.com/v1/records:queryRecord?key=INVALID_KEY'
1114
- ```
1115
-
1116
- ```json
1117
- {
1118
- "error": {
1119
- "code": 400,
1120
- "message": "API key not valid. Please pass a valid API key.",
1121
- "status": "INVALID_ARGUMENT",
1122
- "details": [
1123
- {
1124
- "@type": "type.googleapis.com/google.rpc.Help",
1125
- "links": [
1126
- {
1127
- "description": "Google developers console",
1128
- "url": "https://console.developers.google.com"
1129
- }
1130
- ]
1131
- }
1132
- ]
1133
- }
1134
- }
1135
- ```
1136
-
1137
- </details>
1138
-
1139
- <details>
1140
- <summary>🛑 400 INVALID_ARGUMENT: Invalid value at 'form_factor'/'ect'</summary><br>
1141
-
1142
- ```bash
1143
- curl -d url='https://github.com/' \
1144
- -d formFactor=mobile \
1145
- 'https://chromeuxreport.googleapis.com/v1/records:queryRecord?key=CRUX_API_KEY'
1146
- ```
1147
-
1148
- ```json
1149
- {
1150
- "error": {
1151
- "code": 400,
1152
- "message": "Invalid value at 'form_factor' (type.googleapis.com/google.chrome.uxreport.v1.FormFactor), \"mobile\"",
1153
- "status": "INVALID_ARGUMENT",
1154
- "details": [
1155
- {
1156
- "@type": "type.googleapis.com/google.rpc.BadRequest",
1157
- "fieldViolations": [
1158
- {
1159
- "field": "form_factor",
1160
- "description": "Invalid value at 'form_factor' (type.googleapis.com/google.chrome.uxreport.v1.FormFactor), \"mobile\""
1161
- }
1162
- ]
1163
- }
572
+ "collectionPeriods": [
573
+ { "firstDate": { "year": 2025, "month": 7, "day": 27 }, "lastDate": { "year": 2025, "month": 8, "day": 23 } },
574
+ { "firstDate": { "year": 2025, "month": 8, "day": 3 }, "lastDate": { "year": 2025, "month": 8, "day": 30 } },
575
+ { "firstDate": { "year": 2025, "month": 8, "day": 10 }, "lastDate": { "year": 2025, "month": 9, "day": 6 } },
576
+ { "firstDate": { "year": 2025, "month": 8, "day": 17 }, "lastDate": { "year": 2025, "month": 9, "day": 13 } },
577
+ { "firstDate": { "year": 2025, "month": 8, "day": 24 }, "lastDate": { "year": 2025, "month": 9, "day": 20 } },
578
+ { "firstDate": { "year": 2025, "month": 8, "day": 31 }, "lastDate": { "year": 2025, "month": 9, "day": 27 } },
579
+ { "firstDate": { "year": 2025, "month": 9, "day": 7 }, "lastDate": { "year": 2025, "month": 10, "day": 4 } },
580
+ { "firstDate": { "year": 2025, "month": 9, "day": 14 }, "lastDate": { "year": 2025, "month": 10, "day": 11 } },
581
+ { "firstDate": { "year": 2025, "month": 9, "day": 21 }, "lastDate": { "year": 2025, "month": 10, "day": 18 } },
582
+ { "firstDate": { "year": 2025, "month": 9, "day": 28 }, "lastDate": { "year": 2025, "month": 10, "day": 25 } },
583
+ { "firstDate": { "year": 2025, "month": 10, "day": 5 }, "lastDate": { "year": 2025, "month": 11, "day": 1 } },
584
+ { "firstDate": { "year": 2025, "month": 10, "day": 12 }, "lastDate": { "year": 2025, "month": 11, "day": 8 } },
585
+ { "firstDate": { "year": 2025, "month": 10, "day": 19 }, "lastDate": { "year": 2025, "month": 11, "day": 15 } },
586
+ { "firstDate": { "year": 2025, "month": 10, "day": 26 }, "lastDate": { "year": 2025, "month": 11, "day": 22 } },
587
+ { "firstDate": { "year": 2025, "month": 11, "day": 2 }, "lastDate": { "year": 2025, "month": 11, "day": 29 } },
588
+ { "firstDate": { "year": 2025, "month": 11, "day": 9 }, "lastDate": { "year": 2025, "month": 12, "day": 6 } },
589
+ { "firstDate": { "year": 2025, "month": 11, "day": 16 }, "lastDate": { "year": 2025, "month": 12, "day": 13 } },
590
+ { "firstDate": { "year": 2025, "month": 11, "day": 23 }, "lastDate": { "year": 2025, "month": 12, "day": 20 } },
591
+ { "firstDate": { "year": 2025, "month": 11, "day": 30 }, "lastDate": { "year": 2025, "month": 12, "day": 27 } },
592
+ { "firstDate": { "year": 2025, "month": 12, "day": 7 }, "lastDate": { "year": 2026, "month": 1, "day": 3 } },
593
+ { "firstDate": { "year": 2025, "month": 12, "day": 14 }, "lastDate": { "year": 2026, "month": 1, "day": 10 } },
594
+ { "firstDate": { "year": 2025, "month": 12, "day": 21 }, "lastDate": { "year": 2026, "month": 1, "day": 17 } },
595
+ { "firstDate": { "year": 2025, "month": 12, "day": 28 }, "lastDate": { "year": 2026, "month": 1, "day": 24 } },
596
+ { "firstDate": { "year": 2026, "month": 1, "day": 4 }, "lastDate": { "year": 2026, "month": 1, "day": 31 } },
597
+ { "firstDate": { "year": 2026, "month": 1, "day": 11 }, "lastDate": { "year": 2026, "month": 2, "day": 7 } }
1164
598
  ]
1165
599
  }
1166
600
  }
@@ -1168,55 +602,6 @@ curl -d url='https://github.com/' \
1168
602
 
1169
603
  </details>
1170
604
 
1171
- <details>
1172
- <summary>🛑 404 NOT_FOUND: chrome ux report data not found</summary><br>
1173
-
1174
- ```bash
1175
- curl -d url='https://github.com/search' \
1176
- 'https://chromeuxreport.googleapis.com/v1/records:queryRecord?key=CRUX_API_KEY'
1177
- ```
1178
-
1179
- ```json
1180
- {
1181
- "error": {
1182
- "code": 404,
1183
- "message": "chrome ux report data not found",
1184
- "status": "NOT_FOUND"
1185
- }
1186
- }
1187
- ```
1188
-
1189
- </details>
1190
-
1191
- <details>
1192
- <summary>🛑 429 RESOURCE_EXHAUSTED: Quota exceeded limit 'Queries per 100 seconds' of service</summary><br>
1193
-
1194
- ```bash
1195
- curl -d url='https://github.com/search' \
1196
- 'https://chromeuxreport.googleapis.com/v1/records:queryRecord?key=CRUX_API_KEY'
1197
- ```
1198
-
1199
- ```json
1200
- {
1201
- "code": 429,
1202
- "message": "Quota exceeded for quota group 'default' and limit 'Queries per 100 seconds' of service 'chromeuxreport.googleapis.com' for consumer 'project_number:00000000000000'.",
1203
- "status": "RESOURCE_EXHAUSTED",
1204
- "details": [
1205
- {
1206
- "@type": "type.googleapis.com/google.rpc.Help",
1207
- "links": [
1208
- {
1209
- "description": "Google developer console API key",
1210
- "url": "https://console.developers.google.com/project/00000000000000/apiui/credential"
1211
- }
1212
- ]
1213
- }
1214
- ]
1215
- }
1216
- ```
1217
-
1218
- </details>
1219
-
1220
605
  ## Credits
1221
606
 
1222
607
  Sponsored by [Treo - Page speed monitoring made simple](https://treo.sh/).