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

Caching 2020 queries #1318

Merged
merged 64 commits into from
Nov 12, 2020
Merged

Caching 2020 queries #1318

merged 64 commits into from
Nov 12, 2020

Conversation

raghuramakrishnan71
Copy link
Contributor

@raghuramakrishnan71 raghuramakrishnan71 commented Sep 26, 2020

Queries for the Caching chapter. Progress on #917
Carried forward the open list to #1498
Todo query list

  • Usage of Last-Modified/If-Modified-Since and ETag/If-None-Match compared to the previous year's stats (are they being used more, which is used more often)?
  • Whether making a valid conditional request (passing an If-Modified-Since or If-None-Match request header which matches the previous server response header) actually gets a 304 instead of a 200?
  • Number of websites using AppCache versus service worker.
  • Number of websites using AppCache versus service worker usage by HTTP/HTTPS.
  • Cacheable vs non-cacheable responses.
  • Distribution of TTL in cacheable responses.
  • Desktop cache TTL percentiles by resource type.
  • Distribution of cacheability by content type for desktop.
  • Distribution of cacheability by content type for mobile.
  • Count, percentage of short TTLs
  • Median difference between content age and TTL
  • Percent of 1st party requests with short TTLs.
  • Percent of 3rd party requests with short TTLs.
  • Distribution of Lighthouse scores for the "Uses Long Cache TTL" audit for mobile web pages.

Todo document list

  • Upto Setting cookies on cacheable responses
  • Service workers
  • What type of content are we caching (part 1)?
  • What type of content are we caching (part 2)?
  • What type of content are we caching (part 3)?
  • How do cache TTLs compare to resource age (part 1)?

@raghuramakrishnan71 raghuramakrishnan71 changed the title Update README.md Caching 2020 queries Sep 26, 2020
@raghuramakrishnan71 raghuramakrishnan71 added the analysis Querying the dataset label Sep 26, 2020
@rviscomi rviscomi added this to the 2020 Analysis milestone Sep 26, 2020
@raghuramakrishnan71 raghuramakrishnan71 requested a review from a team September 27, 2020 08:19
@raghuramakrishnan71
Copy link
Contributor Author

@HTTPArchive/analysts have added the first sql file, request review (percentiles of TTL by resource type, client - desktop or mobile).

Copy link
Member

@tunetheweb tunetheweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Query itself is fine. Added a couple of comments on convention that you should follow.

Let us know if any of that is not clear.

sql/2020/20_Caching/01_ttl_by_resource.sql Outdated Show resolved Hide resolved
sql/2020/20_Caching/README.md Outdated Show resolved Hide resolved
sql/2020/20_Caching/01_ttl_by_resource.sql Outdated Show resolved Hide resolved
Copy link
Member

@rviscomi rviscomi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initial query LGTM.

@raghuramakrishnan71
Copy link
Contributor Author

@HTTPArchive/analysts request review of ttl_by_resource_third_party, resource_without_cache, and resource_without_cache_third_party.

Copy link
Member

@tunetheweb tunetheweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of comments but looks like queries are good so no need to submit in smaller batches and just request a re-review when rest are done.

sql/2020/20_Caching/resource_without_cache_third_party.sql Outdated Show resolved Hide resolved
sql/2020/20_Caching/resource_without_cache.sql Outdated Show resolved Hide resolved
@rviscomi
Copy link
Member

rviscomi commented Oct 6, 2020

@raghuramakrishnan71 is this everything? If so I'll give this a thorough review. Otherwise ping this PR when you've added all of the queries.

@rviscomi
Copy link
Member

📟 ping @raghuramakrishnan71

@rviscomi rviscomi added the ASAP This issue is blocking progress label Oct 15, 2020
@raghuramakrishnan71
Copy link
Contributor Author

Updated the SQLs after validating with Chapter contents. @HTTPArchive/analysts

@rviscomi rviscomi requested a review from a team November 6, 2020 18:24
@raghuramakrishnan71
Copy link
Contributor Author

@raghuramakrishnan71
Copy link
Contributor Author

raghuramakrishnan71 commented Nov 7, 2020

(rviscomi: moved TODO list to the top comment for easier tracking)

@AbbyTsai
Copy link
Contributor

AbbyTsai commented Nov 7, 2020

hello, saw some of our metrics may be similar enough to combine as one. here is reference items, and like to hear your thoughts if you get other ideas.
(19_02) 20_Distribution of potential byte savings from the Lighthouse caching audit.
(19_04) 20_Distribution of Lighthouse scores for the "Uses Long Cache TTL" audit for mobile web pages.

Copy link
Member

@rviscomi rviscomi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@raghuramakrishnan71 getting closer. Let's resolve these last few remaining comments and merge and iterate as needed.

sql/2020/20_Caching/appcache_and_serviceworkers.sql Outdated Show resolved Hide resolved
sql/2020/20_Caching/appcache_and_serviceworkers.sql Outdated Show resolved Hide resolved
sql/2020/20_Caching/appcache_and_serviceworkers.sql Outdated Show resolved Hide resolved
raghuramakrishnan71 and others added 4 commits November 11, 2020 10:38
Co-authored-by: Rick Viscomi <[email protected]>
Co-authored-by: Rick Viscomi <[email protected]>
Copy link
Contributor

@AbbyTsai AbbyTsai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these look well to me and found a passion inside.

@raghuramakrishnan71
Copy link
Contributor Author

hello, saw some of our metrics may be similar enough to combine as one. here is reference items, and like to hear your thoughts if you get other ideas.
(19_02) 20_Distribution of potential byte savings from the Lighthouse caching audit.
(19_04) 20_Distribution of Lighthouse scores for the "Uses Long Cache TTL" audit for mobile web pages.

@AbbyTsai - i checked out the compression queries, which are using $.audits.uses-text-compression.score, in the main branch. I am trying to explore if there is a caching specific score (maybe uses-long-cache-ttl) and savings in bytes. Agree, the query may look similar to 19_02, 19_04 as the report field of the lighthouse table is already being used.

@rviscomi
Copy link
Member

Merging this to keep it moving. @raghuramakrishnan71 please open up a new PR if there are any more follow up changes needed.

@rviscomi rviscomi merged commit 6a38b19 into main Nov 12, 2020
@rviscomi rviscomi deleted the caching-sql-2020 branch November 12, 2020 04:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analysis Querying the dataset ASAP This issue is blocking progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants