Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion packages/cwv-stats/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
Expand Down
6 changes: 1 addition & 5 deletions packages/cwv-stats/src/lcp/lcp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Framework>,
): Promise<Array<FrameworkMetric>> {
Expand All @@ -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
Expand Down
Loading