From 60a5a3229f08a8f36363fcf06338f19a47d3240f Mon Sep 17 00:00:00 2001 From: rf Date: Mon, 9 Mar 2026 07:54:40 +1100 Subject: [PATCH] chore(httparchive): use latest view and httparchive project --- docker-compose.yml | 2 +- packages/cwv-stats/README.md | 2 +- packages/cwv-stats/src/lcp/lcp.ts | 6 +----- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index bb0dfc5..30dbae7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,4 +10,4 @@ services: - ./packages/cwv-stats/src:/app/src environment: - GOOGLE_APPLICATION_CREDENTIALS=/app/application_default_credentials.json - - GOOGLE_CLOUD_PROJECT=framework-tracker + - GOOGLE_CLOUD_PROJECT=httparchive diff --git a/packages/cwv-stats/README.md b/packages/cwv-stats/README.md index 440bbc5..478daad 100644 --- a/packages/cwv-stats/README.md +++ b/packages/cwv-stats/README.md @@ -23,7 +23,7 @@ The code that runs the query lives in: To run `cwv-stats` locally (inside Docker) you’ll need: - **Google Cloud Account & Project**. - Setup your Google Cloud Account and new project named `framework-tracker` which has access to BigQuery and the HTTP Archive public dataset + Setup your Google Cloud Account and new project named `httparchive` which has access to BigQuery and the HTTP Archive public dataset (e.g. `httparchive.sample_data.pages_10k`, or the full `httparchive.latest.pages` if you have billing enabled on this account). Visit [Getting started accessing the HTTP Archive with BigQuery](https://har.fyi/guides/getting-started/) - **Docker** installed and running on your machine. [Docker Mac Installation](https://docs.docker.com/desktop/setup/install/mac-install/) diff --git a/packages/cwv-stats/src/lcp/lcp.ts b/packages/cwv-stats/src/lcp/lcp.ts index d7172d4..f62f670 100644 --- a/packages/cwv-stats/src/lcp/lcp.ts +++ b/packages/cwv-stats/src/lcp/lcp.ts @@ -32,10 +32,6 @@ type FrameworkMetric = { stats: PercentileStatistics } -// TODO - Once we have GCP credits replace httparchive.sample_data.pages_10k with httparchive.latest.pages -// httparchive.latest.pages is a view that reflects the latest monthly snapshot. -// httparchive.crawl.pages is all data from 2011 - export async function getFrameworksLCP( frameworks: Array, ): Promise> { @@ -49,7 +45,7 @@ export async function getFrameworksLCP( tech.technology AS framework, SAFE.FLOAT64(JSON_EXTRACT(lighthouse, '$.audits.largest-contentful-paint.numericValue')) AS lcp_ms FROM - \`httparchive.sample_data.pages_10k\`, + \`httparchive.latest.pages\`, UNNEST(technologies) AS tech WHERE client = 'desktop' AND