lighthouse/plots
Patrick Hulce 70f9ecc497
cli: update documented throttling flags (#5000)
2018-04-20 11:08:08 -07:00
..
ab-screenshot tests(eslint): update eslint (and goog config) to latest (#3396) 2017-10-11 16:26:40 -07:00
charts tests(eslint): update eslint (and goog config) to latest (#3396) 2017-10-11 16:26:40 -07:00
dashboard tests(eslint): update eslint (and goog config) to latest (#3396) 2017-10-11 16:26:40 -07:00
test plots: better support power use cases (#2464) 2017-06-14 14:21:34 -04:00
README.md cli: update documented throttling flags (#5000) 2018-04-20 11:08:08 -07:00
analyze.js tests(eslint): update eslint (and goog config) to latest (#3396) 2017-10-11 16:26:40 -07:00
clean.js Compact the license header (plots) 2017-06-05 19:21:14 -07:00
constants.js fix(eslint): Enable trailing commas rule in ESLint, fix all errors (#3324) 2017-09-19 17:48:22 -07:00
generate-dashboard.js fix(eslint): Enable trailing commas rule in ESLint, fix all errors (#3324) 2017-09-19 17:48:22 -07:00
measure.js tests(eslint): update eslint (and goog config) to latest (#3396) 2017-10-11 16:26:40 -07:00
sites.js fix(eslint): Enable trailing commas rule in ESLint, fix all errors (#3324) 2017-09-19 17:48:22 -07:00
sites_subset.js Compact the license header (plots) 2017-06-05 19:21:14 -07:00
utils.js plots: better support power use cases (#2464) 2017-06-14 14:21:34 -04:00

README.md

Lighthouse Metrics Analysis

Online at https://googlechrome.github.io/lighthouse/plots/

For context and roadmap, please see issue: https://github.com/GoogleChrome/lighthouse/issues/1924

Workflow

Setup

You need to build lighthouse first.

Generating & viewing charts

# Run lighthouse to collect metrics data
$ node measure.js

# OR if you want to specify an out directory
$ node measure.js --out out-123

# Analyze the data to generate a summary file (i.e. out-hello/generated-results.js)
# This will launch the charts web page in the browser
# node analyze.js {out_directory}
$ node analyze.js ./out-hello

# Generate dashboard using a parent folder with multiple batch results
$ node generate-dashboard.js out-parent-folder

# Or you can specify each batch result explicitly
$ node generate-dashboard.js out-1 out-2 out-3


Advanced usage

$ node measure.js --help

node measure.js [options]

Lighthouse settings:
  --disable-device-emulation    Disable Nexus 5X emulation                                                     [boolean]

Options to specify sites:
  --sites-path  Include relative path of a json file with urls to run                              [default: "sites.js"]
  --subset      Measure a subset of popular sites
  --site        Include a specific site url to run

Options:
  --help            Show help                                                                                  [boolean]
  --out             Custom out path
  -n                Number of runs per site                                                                 [default: 3]
  --reuse-chrome    Reuse the same Chrome instance across all site runs
  --keep-first-run  If you use --reuse-chrome, by default the first run results are discarded

Examples:
  node measure.js -n 3 --sites-path ./sample-sites.json
  node measure.js --site https://google.com/
  node measure.js --subset