A few assorted scripts and tips to make hacking on Lighthouse a bit easier
- LH Build Tracker - plotted results of build-tracker data
- LH PR Tracking - stats about open PRs, collected daily.
Lighthouse has instrumentation to collect timing data for its operations. The data is exposed at LHR.timing.entries. You can generate a trace from this data for closer analysis.
To generate, run yarn timing-trace with the LHR json:
lighthouse http://example.com --output=json --output-path=lhr.json
yarn timing-trace lhr.jsonThat will generate lhr.json.timing.trace.json. Then, drag 'n drop that file into chrome://tracing.
Getting errors like these?
(node:12732) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1) (node:12732) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Use --trace-warnings to get actual stack traces.
node --trace-warnings lighthouse-cli http://example.comThis will generate new reports from the same results json.
# capture some results first:
lighthouse --output=json http://example.com > temp.report.json
# quickly generate reports:
node generate_report.js > temp.report.html; open temp.report.html// generate_report.js
'use strict';
const ReportGenerator = require('./report/generator/report-generator.js');
const results = require('./temp.report.json');
const html = ReportGenerator.generateReportHtml(results);
console.log(html);See gist.
