Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Javascript sql 2021 #2388

Merged
merged 27 commits into from
Oct 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
8ca1031
add requests, async, module queries
NishuGoel Aug 30, 2021
36b0b45
Added ajax request per page percentile based query.
pankajparkar Sep 10, 2021
7774a0a
Added most requested content-types.
pankajparkar Sep 10, 2021
de19ca1
Formatted query.
pankajparkar Sep 11, 2021
bc6b137
Added query for iframe per page.
pankajparkar Sep 12, 2021
895f031
Percentage usage of different ajax APIs.
pankajparkar Sep 12, 2021
bf828ca
Added h1 vs h2 vs h3 script.
pankajparkar Sep 12, 2021
c87eea5
Added web_components_sepc sql.
pankajparkar Sep 12, 2021
0444c0f
Merge branch 'javascript-sql-2021' of https://github.com/NishuGoel/al…
max-ostapenko Sep 15, 2021
e4c7b30
linting
max-ostapenko Sep 15, 2021
5017cb6
consistent syntax to count number of rows
max-ostapenko Sep 16, 2021
812e8dc
frameworks, sourcemaps queries
NishuGoel Sep 24, 2021
b95883b
1p vs 3p
NishuGoel Sep 24, 2021
7a70e3e
adds unminified, preload/prefetch queries
NishuGoel Sep 24, 2021
d8808e3
Merge remote-tracking branch 'origin/main' into javascript-sql-2021
NishuGoel Sep 29, 2021
396e90e
PR feedback accomodate & fixes
NishuGoel Oct 5, 2021
2534371
link fix
NishuGoel Oct 5, 2021
04a4011
Feedback II update
NishuGoel Oct 6, 2021
387303c
Fixed review comment related to web_component_specs.
pankajparkar Oct 12, 2021
4642675
update content_type and webcomponent query
NishuGoel Oct 18, 2021
fec59a1
Javascript sql 2021 (#2386)
NishuGoel Oct 18, 2021
a48a2f2
Merge branch 'HTTPArchive:javascript-sql-2021' into javascript-sql-2021
NishuGoel Oct 18, 2021
1ac79f1
upstream fetch
NishuGoel Oct 18, 2021
a42124b
lint fixes
NishuGoel Oct 18, 2021
6025b6c
lint fix -2
NishuGoel Oct 18, 2021
11028b8
add review updates
NishuGoel Oct 20, 2021
d036f20
add trailing newline
NishuGoel Oct 20, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions sql/2021/javascript/most_requested_content_type.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
SELECT
rviscomi marked this conversation as resolved.
Show resolved Hide resolved
resp_content_type,
client,
CASE
WHEN resp_content_type LIKE '%image%' THEN 'images'
WHEN resp_content_type LIKE '%font%' THEN 'font'
WHEN resp_content_type LIKE '%css%' THEN 'css'
WHEN resp_content_type LIKE '%javascript%' THEN 'javascript'
WHEN resp_content_type LIKE '%json%' THEN 'json'
ELSE 'other'
END AS content_type,
COUNT(0) AS count,
SUM(COUNT(0)) OVER (PARTITION BY client) AS total,
COUNT(0) / SUM(COUNT(0)) OVER (PARTITION BY client) AS pct
Expand All @@ -8,6 +16,7 @@ FROM
WHERE
date = '2021-07-01'
GROUP BY
client
client,
content_type
ORDER BY
client DESC
pct DESC
23 changes: 7 additions & 16 deletions sql/2021/javascript/web_components_specs.sql
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
SELECT
rviscomi marked this conversation as resolved.
Show resolved Hide resolved
client,
percentile,
APPROX_QUANTILES(custom_elements, 1000)[
OFFSET(percentile * 10)] AS custom_elements,
APPROX_QUANTILES(shadow_roots, 1000)[
OFFSET(percentile * 10)] AS shadow_roots,
APPROX_QUANTILES(template, 1000)[
OFFSET(percentile * 10)] AS template
APPROX_QUANTILES(custom_elements, 1000)[OFFSET(percentile * 10)] AS custom_elements,
APPROX_QUANTILES(shadow_roots, 1000)[OFFSET(percentile * 10)] AS shadow_roots,
APPROX_QUANTILES(template, 1000)[OFFSET(percentile * 10)] AS template
FROM (
SELECT
_TABLE_SUFFIX AS client,
CAST(JSON_EXTRACT(JSON_EXTRACT_SCALAR(payload,
'$._javascript'),
'$.web_component_specs.custom_elements.length') AS INT64) AS custom_elements,
CAST(JSON_EXTRACT(JSON_EXTRACT_SCALAR(payload,
'$._javascript'),
'$.web_component_specs.shadow_roots.length') AS INT64) AS shadow_roots,
CAST(JSON_EXTRACT(JSON_EXTRACT_SCALAR(payload,
'$._javascript'),
'$.web_component_specs.template.length') AS INT64) AS template
ARRAY_LENGTH(JSON_EXTRACT_ARRAY(JSON_EXTRACT_SCALAR(payload, '$._javascript'), '$.web_component_specs.custom_elements')) AS custom_elements,
ARRAY_LENGTH(JSON_EXTRACT_ARRAY(JSON_EXTRACT_SCALAR(payload, '$._javascript'), '$.web_component_specs.shadow_roots')) AS shadow_roots,
ARRAY_LENGTH(JSON_EXTRACT_ARRAY(JSON_EXTRACT_SCALAR(payload, '$._javascript'), '$.web_component_specs.template')) AS template
FROM
`httparchive.pages.2021_07_01_*` ),
`httparchive.pages.2021_09_01_*`),
UNNEST([10, 25, 50, 75, 90, 100]) AS percentile
GROUP BY
percentile,
Expand Down