FeliceGeracitano / webperf-dashboard

Web Performance Dashboard forked from https://github.com/boyney123/garie
Other
51 stars 21 forks source link
bot dashboard docker grafana influxdb lighthouse metrics travis-ci typescript

WebPerformanceDashboard

Introduction

Web performance dashboard powered by Lighthouse, forked from https://github.com/boyney123/garie with addition of

Requirements

Installation

git clone https://github.com/FeliceGeracitano/webperf-dashboard.git

Run the project

$ docker-compose -f "docker-compose.yml" up -d --build

open dashboard at localhost, user: admin pass: secret

this will run 4 services influxdb, chronograf, grafana & felicegeracitano/webperf-dashboard-lighthouse

Configuration

In the root of the application there is a config.json file, which is propagated to packages/lighthouse during docker build step.

example,

{
  "cron": "0 */10 * * * *",
  "urls": [
    { "url": "https://reactjs.org", "options": { "report": true } },
    { "url": "https://vuejs.org", "options": { "report": true } },
    { "url": "https://angular.io", "options": { "report": true } }
  ]
}

Set report if you want to save lighthouse report as html.

More info about the cron pattern at https://www.npmjs.com/package/cron

Dashboards Built-in

Inspired by the lighthouse report, analyze score trend over time, identify performance metric and their thresholds. Read suggestions directly from Latest Lighthouse report embedded in the dashboard

Pretty much a like Single Page Dashboard but oriented to 1vs1 or all comparision.

Develop packages/lighthouse

Comment out felicegeracitano/webperf-dashboard-lighthouse service in docker-compose.yml, then run to spin up dependecies:

$ docker-compose -f "docker-compose.yml" up -d --build
$ cd packages/lighthouse && npm start

Test local container for packages/lighthouse

In docker-compose.yml replace felicegeracitano/webperf-dashboard-lighthouse with webperf-dashboard-lighthouse (or any other local name you prefer), then run:

$ cd packages/lighthouse && docker build -t webperf-dashboard-lighthouse .
$ cd ../.. && docker-compose up

Deploy your container

$ cd packages/lighthouse
$ docker tag webperf-dashboard-lighthouse:latest felicegeracitano/webperf-dashboard-lighthouse:latest
$ docker push felicegeracitano/webperf-dashboard-lighthouse:latest

Tip:
replace latest tag with fixed version etc 1.1, 2.0...

Troubleshooting

GitHub BOT

You can improve reviewers life running Lighthouse audit on every PR update. In this repo there is an example using a Travis CI, the job communicate progress and result to GitHub.

Running Job:

Result Comment from the BOT:

Configure your repo with a Travis Job:

Other Tips