New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

perfomatic

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

perfomatic

Run Lighthouse performance tests easily from your app

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

Perfomatic

Run Lighthouse performance tests easily from your app

screenshot

Install

From your app's root:

npm install perfomatic --save-dev

Add a simple perfomatic config to your package.json

"perfomatic": {
  "urls": [
    "http://localhost:5000"
  ],
  "overall": 95,
  "budget": {
    "speed-index-metric": 90,
    "time-to-first-byte": true
  }
}

Make an npm script for it

"scripts": {
  "perf": "perfomatic"
}

START UP YOUR SERVER at the urls you want to test against, then run perfomatic:

npm run perf

OR

Sample vscode debugger setup (put this in your app to run with F5 debugger)

{
  // Use IntelliSense to learn about possible attributes.
  // Hover to view descriptions of existing attributes.
  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0",
  "configurations": [
    {
      "type": "node",
      "request": "launch",
      "name": "Perfomatic Tests",
      "stopOnEntry": false,
      "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
      "args": ["--no-timeouts", "--colors", "${workspaceFolder}/node_modules/perfomatic/test.js"],
      "internalConsoleOptions": "openOnSessionStart"
    }
  ]
}

All available package.json config options

"perfomatic": {
  "urls": [
    "http://localhost:5000"
  ],
  "verbose": true, // show metric output, and HELP feedback about failed metrics
  "showAvailableMetrics": true, // print current available metrics and scoring types, binary or numeric
  "overall": 90,
  "budget": {
    "speed-index-metric": 90, // numeric (0-100, higher is better)
    "time-to-first-byte": true, // binary (false)
    ... // all the other metrics
    }
  }
}

Keywords

performance

FAQs

Package last updated on 31 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts