
Security News
rv Is a New Rust-Powered Ruby Version Manager Inspired by Python's uv
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
@nodaguti/lightkeeper
Advanced tools
A synthetic monitoring and analysis tool built on top of Lighthouse
A synthetic monitoring and analysis tool built on top of Lighthouse
$ yarn add --global @nodaguti/lightkeeper
$ lightkeeper --url=https://example.com --device=<'mobile'|'desktop'> --config=/path/to/config.json
import { lightkeeper } from '@nodaguti/lightkeeper';
const results = await lightkeeper({
url,
device,
runs,
aggregate,
metricConfigs,
lighthouseFlags,
lighthouseConfig,
});
{
"results": [
// Each "metrics" represents a single run of Lighthouse
{
"metrics": [
{ "name": "largest-contentful-paint", value: 1234.56 },
{ "name": "total-blocking-time", value: 123.45 },
// ....
],
}
{
"metrics": [
{ "name": "largest-contentful-paint", value: 1234.56 },
{ "name": "total-blocking-time", value: 123.45 },
// ....
],
},
// ...
];
}
When aggregate
option is set to true
, aggregated data will also be included:
{
results: [], // same as above
aggregated: [
{
name: 'largest-contentful-paint',
value: {
min: 0,
max: 0,
sum: 0,
mean: 0,
median: 0,
variance: 0,
standardDeviation: 0,
},
},
{
name: 'total-blocking-time',
value: {
// ...
},
},
// ...
],
}
{
"runs": 3,
"failFast": false,
"aggregate": true,
"lighthouse": {
"flags": {},
"config": {
"settings": {
"skipAudits": ["screenshot-thumbnails", "final-screenshot"]
}
}
},
"metrics": [
{
"name": "largest-contentful-paint",
"query": "$['audits']['largest-contentful-paint']['numericValue']"
},
{
"name": "total-blocking-time",
"query": "$['audits']['total-blocking-time']['numericValue']"
},
{
"name": "cumulative-layout-shift",
"query": "$['audits']['cumulative-layout-shift']['numericValue']"
},
{
"name": "user-timing-foo",
"query": "$['audits']['user-timings']['details']['items'][?(@['name']=='foo')]['startTime']"
}
]
}
Required
Specifies how many times Lighthouse will run. A higher value contibutes more robust results but takes a long time to finish measuring.
Optional
(Default: true
)
If set true, Lightkeeper will terminate its process immediately after an error occurs. Otherwise, it will continue to try running Lighthouse for given times.
Optional
(Default: false
)
If set true, Lightkeeper will also report an aggregated result of multiple runs in addition to metrics collected by each run.
Optional
(Default: {}
)
This object is passed to the second argument of lighthouse()
. The available flags can be found in Lighthouse's document.
Optional
(Default: {}
)
This object is passed to the third argument of lighthouse()
. See Lighthouse's document for the full list of available options.
Required
A list of metrics that will be extracted from a Lighthouse output.
query
is a JSONPath expression that tells Lightkeeper how to get a metric from a Lighthouse result. You can find the type definition of the result object in Lighthouse's typedefs.
FAQs
A synthetic monitoring and analysis tool built on top of Lighthouse
The npm package @nodaguti/lightkeeper receives a total of 1 weekly downloads. As such, @nodaguti/lightkeeper popularity was classified as not popular.
We found that @nodaguti/lightkeeper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.