diff --git a/front/src/views/dashboard.html b/front/src/views/dashboard.html index cdce76d..e38ce19 100644 --- a/front/src/views/dashboard.html +++ b/front/src/views/dashboard.html @@ -43,7 +43,7 @@
{{rule.policy.label}}
{{rule.value | bytes}} - {{rule.value}} + {{rule.value}} {{rule.policy.unit}} diff --git a/front/src/views/rule.html b/front/src/views/rule.html index 201a7d4..245dbe0 100644 --- a/front/src/views/rule.html +++ b/front/src/views/rule.html @@ -12,12 +12,12 @@

Value: {{rule.value | bytes}} - {{rule.value}} + {{rule.value}} {{rule.policy.unit}}

Have {{rule.policy.isOkThreshold | bytes}} - {{rule.policy.isOkThreshold}} + {{rule.policy.isOkThreshold}} {{rule.policy.unit}} or less or more to get the 100/100 score. diff --git a/lib/metadata/policies.js b/lib/metadata/policies.js index 358b748..bbc61b9 100644 --- a/lib/metadata/policies.js +++ b/lib/metadata/policies.js @@ -46,6 +46,16 @@ var policies = { "isAbnormalThreshold": 50, "hasOffenders": true }, + "scriptDuration": { + "tool": "phantomas", + "label": "Total JS execution time", + "message": "

This is the number of milliseconds spent by the browser on JavaScript execution during page load.

For more details, try using the performance tab in Chrome DevTools. It is a bit complicated at first sight, but you'll be able to analyze exactly where this execution time is spent.

", + "isOkThreshold": 500, + "isBadThreshold": 2000, + "isAbnormalThreshold": 4000, + "hasOffenders": false, + "unit": 'ms' + }, "DOMaccesses": { "tool": "domAccessAgregator", "label": "DOM access", diff --git a/lib/metadata/scoreProfileGeneric.json b/lib/metadata/scoreProfileGeneric.json index 3131fef..3fbbe03 100644 --- a/lib/metadata/scoreProfileGeneric.json +++ b/lib/metadata/scoreProfileGeneric.json @@ -13,7 +13,7 @@ "requests": { "label": "Requests", "policies": { - "totalRequests": 5, + "totalRequests": 2, "domains": 3, "notFound": 3, "identicalFiles": 2, @@ -35,7 +35,8 @@ "javascriptComplexity": { "label": "JS complexity", "policies": { - "DOMaccesses": 4, + "scriptDuration": 4, + "DOMaccesses": 3, "eventsScrollBound": 1 } }, @@ -105,7 +106,7 @@ }, "globalScore": { "pageWeight": 3, - "requests": 3, + "requests": 2, "domComplexity": 2, "javascriptComplexity": 2, "badJavascript": 2,