performance-leaderboard
A plugin to run Lighthouse against a set of urls to see which site is the fastest.
Installation
npm install performance-leaderboard
Usage
- Create a test file, say
sample.js
:
const PerfLeaderboard = require("performance-leaderboard");
(async function() {
let urls = [
"https://www.gatsbyjs.org/",
"https://nextjs.org/",
"https://www.11ty.dev/",
"https://vuejs.org/",
"https://reactjs.org/",
"https://amp.dev/",
"https://jekyllrb.com/",
"https://nuxtjs.org/",
"https://gridsome.org/",
"https://svelte.dev/",
"https://gohugo.io/",
"https://redwoodjs.com/"
];
console.log( await PerfLeaderboard(urls) );
// Run each site 5 times (default is 3)
console.log( await PerfLeaderboard(urls, 5) );
})();
- Run
node sample.js
.
Experiments
- Maybe switch to use Puppeteer for headless testing instead of
chrome-launcher