Created
April 12, 2020 09:20
-
-
Save nopium/1edda9357e6256d59ab666a5d0e11d42 to your computer and use it in GitHub Desktop.
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 characters
| // 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)}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment