2.0.1 • Published 1 year ago

lighthouse-plugin-user-flow-metrics v2.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

lighthouse-plugin-user-flow-metrics

Lighthouse plugin for auditing custom performance metrics.

Usage

npm install -D lighthouse-plugin-user-flow-metrics

Add the plugin to your Lighthouse configuration:

module.exports = {
  extends: 'lighthouse:default',
  settings: {
    plugins: ['lighthouse-plugin-user-flow-metrics'],
  },
}

Create a budget file:

{
  "measurement_page::form_disabled": 1700,
  "measurement_page::render": 20,
  "measurement_page::change_of_tq_unit": 1000,
  "user_input::increase_value_by_btn": 10
}

Let the plugin know where your budget file is located:

process.env.LIGHTHOUSE_USER_FLOW_BUDGETS = '/path/to/budget/file'

Instrument your code with marks and measures:

performance.mark('start work')
// do some work
performance.measure('My heavy work', 'start work')

Run Lighthouse configured with this plugin on your page to get custom performance metrics.

2.0.1

1 year ago

2.0.0

1 year ago

1.0.0

2 years ago