GoogleChromeLabs / perftools-runner

Google Performance Tools runner using Puppeteer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Google Performance Tools Runner

Web frontend which allows users to simultaneously run several of Google's performance tools (Lighthouse, PageSpeed Insights, Webpage Test) against a URL, all at once. Puppeteer is used to take screenshots of the results from each tool and create an aggregated PDF of all results.

screen shot 2018-05-01 at 7 15 10 pm

Explainer

Start the server with npm start.

The frontend (http://localhost:8080) UI displays a list of tools for the user to select.

When "Enter" is hit, this fires off a request o the /run handler. That handler takes a url and tools param. The latter is a "," separated list of tools to run. One of LH, PSI, WPT.

The response is a JSON array of the tools that were run (e.g. ["LH", "PSI"]).

Note: every run of the tool logs the URL that was audited and tools to that were run to runs.txt.

Examples

Run Lighthouse and PSI against https://example.com:

http://localhost:8080/run?url=https://example.com/&tools=LH,PSI

Run Lighthouse against https://example.com using full chrome:

http://localhost:8080/run?url=https://example.com/&tools=LH&headless=false

Installation & Setup

Check the repo and run npm i. You'll need Node 8+ support for ES modules to work.

Development

Start the server in the project root:

npm start

Lint:

npm run lint

For development, both serviceAccount.json and bitlyAccount.json are required.

About

Google Performance Tools runner using Puppeteer

License:Apache License 2.0


Languages

Language:JavaScript 59.7%Language:HTML 21.8%Language:CSS 15.3%Language:Dockerfile 3.2%