Calibre provides three sources of performance data: Real User Metrics (RUM), Chrome UX Report (CrUX) and Synthetic monitoring. Each can be queried via the CLI to retrieve metrics for your pages.
Real User Metrics (RUM)#
Retrieve performance data collected from real visitors to your site.
Summary#
Display aggregate web vitals and UX ratings for a site.
Read Sites
calibre rum summary --site=calibre --jsonFilter by country, device type, URL path or page grouping:
calibre rum summary --site=calibre --duration=30 --country=AU --device=mobile --jsonHistory#
Display RUM historical trends over time.
calibre rum history --site=calibre --duration=30 --jsonPages#
Display a page-level breakdown of RUM data.
calibre rum pages --site=calibre --sortBy=sessionCount --jsonChrome UX Report (CrUX)#
Retrieve field data from Google's Chrome UX Report, including Core Web Vitals assessment.
Summary#
Display origin-level CrUX performance data and Core Web Vitals assessment.
Read Sites
calibre crux summary --site=calibre --jsoncalibre crux summary --site=calibre --formFactor=mobile --jsonHistory#
Display CrUX historical trends for a site.
calibre crux history --site=calibre --jsonURLs#
List all CrUX monitored URLs with their metrics and Core Web Vitals assessment.
calibre crux urls --site=calibre --jsonSingle URL#
Display CrUX data for a specific monitored URL.
calibre crux url <uuid> --site=calibre --jsonSynthetic#
Retrieve metrics collected by Calibre's Synthetic monitoring infrastructure (Lighthouse-based lab tests).
Timeseries metrics#
You can query up to 6 months of reporting data per request. Use from and to parameters to specify date ranges.
Read Sites
calibre synthetic metrics --site=calibre --json --metrics=largestContentfulPaint --metrics=lighthousePerformanceScore#!/usr/bin/env node
import { TimeSeries } from 'calibre'
const getTimeseries = async ({ site, from, to, pages, profiles, measurements }) => {
const results = await TimeSeries.list({
site,
from,
to,
pages,
profiles,
measurements
})
// Output the formatted JSON response
console.log(JSON.stringify(results, null, 2))
}
const siteSlug = 'calibre'
const to = new Date()
// 7 days of history
const from = new Date()
from.setDate(to.getDate() - 7)
// Filter by page and/or test profile (omitting `page` will return all pages, omitting `profile` will return all profiles)
const pages = ['a48ddb67-0da5-4731-91c4-42239009b463']
const profiles = ['ddbf3952-4b96-4657-88a1-60abb097f44e']
// Filter the metrics to be returned (omitting `measurements` will return all available measurements)
const measurements = ['lighthousePerformanceScore', 'totalBlockingTime']
getTimeseries({ site: siteSlug, from, to, pages, profiles, measurements })| Parameter | CLI | Node.js API | Description |
|---|---|---|---|
| site | --site | site | The site slug |
| from | --from | from | Start date for the query (ISO 8601 format) |
| to | --to | to | End date for the query (ISO 8601 format) |
| pages | --page | pages | Filter by page UUID(s) |
| profiles | --profile | profiles | Filter by test profile UUID(s) |
| measurements | --metrics | measurements | Filter by metric name(s) |
Snapshot metrics#
Retrieve all metrics from a single Snapshot.
Read Sites
calibre synthetic get-snapshot-metrics --site=calibre --snapshot=2000 --json#!/usr/bin/env node
import { SnapshotMetrics } from 'calibre'
const getSnapshotMetrics = async ({ site, snapshotId }) => {
const results = await SnapshotMetrics.snapshot({ site, snapshotId })
// Output the formatted JSON response
console.log(JSON.stringify(results, null, 2))
}
const siteSlug = 'calibre'
const snapshotId = 1000
getSnapshotMetrics({ site: siteSlug, snapshotId })curl -X GET -H "Accept: application/json" \
https://calibreapp.com/api/sites/<site>/snapshots/<snapshotId>?secret=<secret>| Parameter | CLI | Node.js API | Description |
|---|---|---|---|
| site | --site | site | The site slug |
| snapshot | --snapshot | snapshotId | The snapshot ID |