Skip to content

Commit

Permalink
readme: add notes on per runs
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish authored May 31, 2017
1 parent 400457b commit ae85658
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions docs/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,22 @@ launchChromeAndRunLighthouse('https://example.com', flags).then(results => {
});
```

## Performance-only Lighthouse run

Many modules consuming Lighthouse are only interested in the performance numbers.
Lighthouse ships with a [performance-only config](https://github.com/GoogleChrome/lighthouse/blob/master/lighthouse-core/config/perf.json) that you can use:

```js
const perfConfig: any = require('lighthouse/lighthouse-core/config/perf.json');

// ...

lighthouse(url, flags, perfConfig)
```

You can also craft your own config (e.g. [plots.json](https://github.com/GoogleChrome/lighthouse/blob/master/lighthouse-core/config/plots.json)) for completely custom runs.


### Turn on logging

If you want to see log output as Lighthouse runs, include the `log` module
Expand All @@ -49,9 +65,9 @@ When installed globally via `npm i -g lighthouse` or `yarn global add lighthouse
`chrome-debug` is added to your `PATH`. This binary launches a standalone Chrome
instance with an open debugging port.

- Run `chrome-debug`. This will log the debugging port your instance of Chrome is running on
- navigate to and log in to your site
- in a separate terminal tab `lighthouse http://mysite.com --port port-number` using the port number your Chrome instance is running on
1. Run `chrome-debug`. This will log the debugging port of your Chrome instance
1. Navigate to your site and log in.
1. In a separate terminal tab, run `lighthouse http://mysite.com --port port-number` using the port number from chrome-debug.

## Testing on a mobile device

Expand Down

0 comments on commit ae85658

Please sign in to comment.