Created
April 12, 2020 09:20
-
-
Save nopium/1edda9357e6256d59ab666a5d0e11d42 to your computer and use it in GitHub Desktop.
Revisions
-
nopium created this gist
Apr 12, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,40 @@ // lighthouse-batch -s -p "--perf --quiet" -f urls-boats.txt -o report-lvb var parsedJSON = require('./report-lvb/summary.json'); var worst = []; var seventies = []; var eighties = []; var nineties = []; console.log('Total: '+parsedJSON.length); for (var r in parsedJSON) { var row = parsedJSON[r]; try { if (row.detail.performance < 0.7) { worst.push(row) console.log(row) } if (row.detail.performance < .80) { seventies.push(row); } else if (row.detail.performance <= .90) { eighties.push(row); } else if (row.detail.performance <= 1) { nineties.push(row); } else { // console.log(row); } } catch (e) { console.log('Exc:' + row.url) } } console.log('<70s: ' + worst.length); console.log('70s: ' + seventies.length); console.log('80s: ' + eighties.length); console.log('90s: ' + nineties.length); worst.map(function(e){console.log(e.url)});