Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

readme.md

Basic Custom Audit Recipe

Tip: see Lighthouse Architecture for information on terminology and architecture.

What this example does

This example shows how to write a custom Lighthouse audit that measures memory usage using the Chrome DevTools Protocol Memory.startSampling command. The audit fails if any memory sample exceeds 1 MB.

The Audit, Gatherer, and Config

Note: when extending the default configuration file, all arrays will be concatenated and primitive values will override the defaults.

Run the configuration

Run Lighthouse with the custom audit by using the --config-path flag with your configuration file:

lighthouse --config-path=custom-config.js https://example.com