-
-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:HTTPArchive/almanac.httparchive.org…
… into production
- Loading branch information
Showing
117 changed files
with
4,323 additions
and
220 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,6 @@ jobs: | |
if: github.repository == 'HTTPArchive/almanac.httparchive.org' | ||
steps: | ||
- name: Update release notes | ||
uses: release-drafter/[email protected].0 | ||
uses: release-drafter/[email protected].1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
CREATE TEMP FUNCTION HAS_NO_STORE_DIRECTIVE(cache_control STRING) RETURNS BOOL AS ( | ||
REGEXP_CONTAINS(cache_control, r'(?i)\bno-store\b') | ||
); | ||
|
||
WITH requests AS ( | ||
SELECT | ||
client, | ||
rank, | ||
LOGICAL_OR(HAS_NO_STORE_DIRECTIVE(JSON_VALUE(payload, '$._cacheControl'))) AS includes_ccns | ||
FROM | ||
`httparchive.almanac.summary_response_bodies` | ||
WHERE | ||
date = '2022-06-01' AND | ||
firstHtml | ||
GROUP BY | ||
client, | ||
rank, | ||
page | ||
) | ||
|
||
SELECT | ||
client, | ||
_rank AS rank, | ||
COUNTIF(includes_ccns) AS pages, | ||
COUNT(0) AS total, | ||
COUNTIF(includes_ccns) / COUNT(0) AS pct | ||
FROM | ||
requests, | ||
UNNEST([1000, 10000, 100000, 1000000, 10000000]) AS _rank | ||
WHERE | ||
rank <= _rank | ||
GROUP BY | ||
client, | ||
rank | ||
ORDER BY | ||
rank, | ||
client |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
WITH lh AS ( | ||
SELECT | ||
_TABLE_SUFFIX AS client, | ||
url AS page, | ||
JSON_VALUE(report, '$.audits.no-unload-listeners.score') = '0' AS has_unload | ||
FROM | ||
`httparchive.lighthouse.2022_06_01_*` | ||
), | ||
|
||
pages AS ( | ||
SELECT | ||
_TABLE_SUFFIX AS client, | ||
url AS page, | ||
rank | ||
FROM | ||
`httparchive.summary_pages.2022_06_01_*` | ||
) | ||
|
||
|
||
SELECT | ||
client, | ||
_rank AS rank, | ||
COUNTIF(has_unload) AS pages, | ||
COUNT(0) AS total, | ||
COUNTIF(has_unload) / COUNT(0) AS pct | ||
FROM | ||
lh | ||
JOIN | ||
pages | ||
USING | ||
(client, page), | ||
UNNEST([1000, 10000, 100000, 1000000, 10000000]) AS _rank | ||
WHERE | ||
rank <= _rank | ||
GROUP BY | ||
client, | ||
rank | ||
ORDER BY | ||
rank, | ||
client |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
WITH lh AS ( | ||
SELECT | ||
_TABLE_SUFFIX AS client, | ||
ARRAY_LENGTH(JSON_QUERY_ARRAY(report, '$.audits.non-composited-animations.details.items')) AS num_animations | ||
FROM | ||
`httparchive.lighthouse.2022_06_01_*` | ||
) | ||
|
||
|
||
SELECT | ||
percentile, | ||
client, | ||
APPROX_QUANTILES(num_animations, 1000)[OFFSET(percentile * 10)] AS num_animations, | ||
COUNTIF(num_animations > 0) AS pages, | ||
COUNT(0) AS total, | ||
COUNTIF(num_animations > 0) / COUNT(0) AS pct | ||
FROM | ||
lh, | ||
UNNEST([10, 25, 50, 75, 90, 100]) AS percentile | ||
GROUP BY | ||
percentile, | ||
client | ||
ORDER BY | ||
percentile, | ||
client |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
WITH lh AS ( | ||
SELECT | ||
_TABLE_SUFFIX AS client, | ||
CAST(JSON_VALUE(unsized_image, '$.node.boundingRect.height') AS INT64) AS height | ||
FROM | ||
`httparchive.lighthouse.2022_06_01_*`, | ||
UNNEST(JSON_QUERY_ARRAY(report, '$.audits.unsized-images.details.items')) AS unsized_image | ||
) | ||
|
||
|
||
SELECT | ||
percentile, | ||
client, | ||
APPROX_QUANTILES(height, 1000)[OFFSET(percentile * 10)] AS height, | ||
COUNT(0) AS unsized_images | ||
FROM | ||
lh, | ||
UNNEST([10, 25, 50, 75, 90, 100]) AS percentile | ||
GROUP BY | ||
percentile, | ||
client | ||
ORDER BY | ||
percentile, | ||
client |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
WITH lh AS ( | ||
SELECT | ||
_TABLE_SUFFIX AS client, | ||
ARRAY_LENGTH(JSON_QUERY_ARRAY(report, '$.audits.unsized-images.details.items')) AS num_unsized_images | ||
FROM | ||
`httparchive.lighthouse.2022_06_01_*` | ||
) | ||
|
||
|
||
SELECT | ||
percentile, | ||
client, | ||
APPROX_QUANTILES(num_unsized_images, 1000)[OFFSET(percentile * 10)] AS num_unsized_images, | ||
COUNTIF(num_unsized_images > 0) AS pages, | ||
COUNT(0) AS total, | ||
COUNTIF(num_unsized_images > 0) / COUNT(0) AS pct | ||
FROM | ||
lh, | ||
UNNEST([10, 25, 50, 75, 90, 100]) AS percentile | ||
GROUP BY | ||
percentile, | ||
client | ||
ORDER BY | ||
percentile, | ||
client |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
WITH long_tasks AS ( | ||
SELECT | ||
_TABLE_SUFFIX AS client, | ||
url AS page, | ||
CAST(JSON_QUERY(item, '$.duration') AS FLOAT64) AS long_task_duration | ||
FROM | ||
`lighthouse.2022_06_01_*`, | ||
UNNEST(JSON_QUERY_ARRAY(report, '$.audits.long-tasks.details.items')) AS item | ||
), | ||
|
||
per_page AS ( | ||
SELECT | ||
client, | ||
page, | ||
SUM(long_task_duration) AS long_tasks | ||
FROM | ||
long_tasks | ||
GROUP BY | ||
client, | ||
page | ||
) | ||
|
||
SELECT | ||
percentile, | ||
client, | ||
APPROX_QUANTILES(long_tasks, 1000)[OFFSET(percentile * 10)] AS long_tasks | ||
FROM | ||
per_page, | ||
UNNEST([10, 25, 50, 75, 90, 100]) AS percentile | ||
GROUP BY | ||
percentile, | ||
client | ||
ORDER BY | ||
percentile, | ||
client |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
SELECT | ||
percentile, | ||
_TABLE_SUFFIX AS client, | ||
APPROX_QUANTILES(CAST(JSON_QUERY(report, '$.audits.total-blocking-time.numericValue') AS FLOAT64), 1000)[OFFSET(percentile * 10)] AS tbt | ||
FROM | ||
`httparchive.lighthouse.2022_06_01_*`, | ||
UNNEST([10, 25, 50, 75, 90, 100]) AS percentile | ||
GROUP BY | ||
percentile, | ||
client | ||
ORDER BY | ||
percentile, | ||
client |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
SELECT | ||
IF(_rank < 10000000, CAST(_rank AS STRING), 'all') AS rank, | ||
_TABLE_SUFFIX AS client, | ||
APPROX_QUANTILES(bytesJS, 1001)[OFFSET(501)] / 1024 AS js_kbytes | ||
FROM | ||
`httparchive.summary_pages.2022_06_01_*`, | ||
UNNEST([1000, 10000, 100000, 1000000, 10000000]) AS _rank | ||
WHERE | ||
rank <= _rank | ||
GROUP BY | ||
rank, | ||
client | ||
ORDER BY | ||
rank, | ||
client |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
WITH pages AS ( | ||
SELECT | ||
_TABLE_SUFFIX AS client, | ||
CAST(JSON_VALUE(payload, '$._metadata.page_id') AS INT64) AS pageid, | ||
JSON_VALUE(payload, '$._performance.lcp_elem_stats.url') AS url | ||
FROM | ||
`httparchive.pages.2022_06_01_*` | ||
), | ||
|
||
requests AS ( | ||
SELECT | ||
_TABLE_SUFFIX AS client, | ||
pageid, | ||
url, | ||
respSize / 1024 AS kbytes | ||
FROM | ||
`httparchive.summary_requests.2022_06_01_*` | ||
) | ||
|
||
SELECT | ||
percentile, | ||
client, | ||
APPROX_QUANTILES(kbytes, 1000)[OFFSET(percentile * 10)] AS kbytes | ||
FROM | ||
pages | ||
JOIN | ||
requests | ||
USING | ||
(client, pageid, url), | ||
UNNEST([10, 25, 50, 75, 90, 100]) AS percentile | ||
GROUP BY | ||
percentile, | ||
client | ||
ORDER BY | ||
percentile, | ||
client |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
WITH pages AS ( | ||
SELECT | ||
_TABLE_SUFFIX AS client, | ||
CAST(JSON_VALUE(payload, '$._metadata.page_id') AS INT64) AS pageid, | ||
JSON_VALUE(payload, '$._performance.lcp_elem_stats.url') AS url | ||
FROM | ||
`httparchive.pages.2022_06_01_*` | ||
), | ||
|
||
requests AS ( | ||
SELECT | ||
_TABLE_SUFFIX AS client, | ||
pageid, | ||
url, | ||
respSize / 1024 AS kbytes | ||
FROM | ||
`httparchive.summary_requests.2022_06_01_*` | ||
) | ||
|
||
SELECT | ||
client, | ||
IF(CEILING(kbytes / 100) * 100 < 1000, CAST(CEILING(kbytes / 100) * 100 AS STRING), '1000+') AS kbytes, | ||
COUNT(0) AS freq, | ||
SUM(COUNT(0)) OVER (PARTITION BY client) AS total, | ||
COUNT(0) / SUM(COUNT(0)) OVER (PARTITION BY client) AS pct | ||
FROM | ||
pages | ||
JOIN | ||
requests | ||
USING | ||
(client, pageid, url) | ||
GROUP BY | ||
client, | ||
kbytes | ||
ORDER BY | ||
client, | ||
kbytes |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
WITH pages AS ( | ||
SELECT | ||
_TABLE_SUFFIX AS client, | ||
CAST(JSON_VALUE(payload, '$._metadata.page_id') AS INT64) AS pageid, | ||
JSON_VALUE(payload, '$._performance.lcp_elem_stats.url') AS url | ||
FROM | ||
`httparchive.pages.2022_06_01_*` | ||
), | ||
|
||
requests AS ( | ||
SELECT | ||
_TABLE_SUFFIX AS client, | ||
pageid, | ||
url, | ||
format | ||
FROM | ||
`httparchive.summary_requests.2022_06_01_*` | ||
) | ||
|
||
SELECT | ||
client, | ||
format, | ||
COUNT(0) AS freq, | ||
SUM(COUNT(0)) OVER (PARTITION BY client) AS total, | ||
COUNT(0) / SUM(COUNT(0)) OVER (PARTITION BY client) AS pct | ||
FROM | ||
pages | ||
JOIN | ||
requests | ||
USING | ||
(client, pageid, url) | ||
GROUP BY | ||
client, | ||
format | ||
ORDER BY | ||
pct DESC |
Oops, something went wrong.