rlaffers / lighthouse-plugin-user-flow-metrics

Lighthouse plugin for auditing custom performance metrics.

Repository from Github https://github.comrlaffers/lighthouse-plugin-user-flow-metricsRepository from Github https://github.comrlaffers/lighthouse-plugin-user-flow-metrics

lighthouse-plugin-user-flow-metrics

Lighthouse plugin for auditing custom performance metrics.

report example

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.

About

Lighthouse plugin for auditing custom performance metrics.

License:MIT License


Languages

Language:JavaScript 97.5%Language:Shell 2.5%