New 'Small requests' category with smallJsFils, smallCssFiles and smallImages rules

This commit is contained in:
Gaël Métais
2014-12-29 12:46:56 +01:00
parent 519f2ba617
commit 7c6676c981
2 changed files with 33 additions and 0 deletions
+24
View File
@@ -367,6 +367,30 @@ var policies = {
"isBadThreshold": 20,
"isAbnormalThreshold": 40
},
"smallJsFiles": {
"tool": "phantomas",
"label": "Small JS files",
"message": "<p>Number of JS assets smaller than 2 KB that could probably be inlined or merged.</p>",
"isOkThreshold": 2,
"isBadThreshold": 10,
"isAbnormalThreshold": 16
},
"smallCssFiles": {
"tool": "phantomas",
"label": "Small CSS files",
"message": "<p>Number of CSS assets smaller than 2 KB that could probably be inlined or merged.</p>",
"isOkThreshold": 0,
"isBadThreshold": 8,
"isAbnormalThreshold": 12
},
"smallImages": {
"tool": "phantomas",
"label": "Small images",
"message": "<p>Images smaller than 2 KB that could be base64 encoded or merged into a sprite.</p>",
"isOkThreshold": 2,
"isBadThreshold": 17,
"isAbnormalThreshold": 30
},
"notFound": {
"tool": "phantomas",
"label": "404 not found",
+9
View File
@@ -80,6 +80,14 @@
"otherCount": 0
}
},
"smallRequests": {
"label": "Small requests",
"policies": {
"smallJsFiles": 1,
"smallCssFiles": 1,
"smallImages": 1
}
},
"network": {
"label": "Network",
"policies": {
@@ -101,6 +109,7 @@
"cssComplexity": 1,
"badCSS": 1,
"requests": 3,
"smallRequests": 1,
"network": 2
}
}