diff --git a/dependencies/rasterize.js b/dependencies/rasterize.js index 7eae9de18..138a8d437 100644 --- a/dependencies/rasterize.js +++ b/dependencies/rasterize.js @@ -7,7 +7,7 @@ if (phantom.args.length < 2 || phantom.args.length > 3) { } else { address = phantom.args[0]; output = phantom.args[1]; - page.viewportSize = { width: 600, height: 600 }; + page.viewportSize = { width: 1440, height: 900 }; page.open(address, function (status) { if (status !== 'success') { console.log('Unable to load the address!'); diff --git a/report/properties/page.properties b/report/properties/page.properties new file mode 100644 index 000000000..4fa80288e --- /dev/null +++ b/report/properties/page.properties @@ -0,0 +1,2 @@ +pageDescription=All data for one page. +pageMenu=page \ No newline at end of file diff --git a/report/properties/summary.properties b/report/properties/summary.properties new file mode 100644 index 000000000..f23a65cff --- /dev/null +++ b/report/properties/summary.properties @@ -0,0 +1,2 @@ +pageDescription=An executive summary. +pageMenu=summary \ No newline at end of file diff --git a/report/velocity/header.vm b/report/velocity/header.vm index 7a130589a..802d3b981 100644 --- a/report/velocity/header.vm +++ b/report/velocity/header.vm @@ -33,24 +33,19 @@
| + Rule + | ++ Score + | ++ Message + | ++ Extra + | +
|---|---|---|---|
| $message.getName() | +$message.getChild("score").getValue() | +$message.getChild("message").getValue() | +
+ #foreach ($item in $message.getChild("components").getChildren("item"))
+ $item.getValue() + #end + |
+
| + url + | ++ type + | ++ size + | ++ expires + | ++ gzip + | +
|---|---|---|---|---|
| + $asset.getChild("url").getValue() + + #end + "> + + | ++ $asset.getChild("type").getValue() + | ++ $asset.getChild("size").getValue() + | ++ #if($!{asset.getChild("expires")}) + $asset.getChild("expires").getValue() + #else + 0 + #end + | ++ #if($!{asset.getChild("gzip")}) + $asset.getChild("gzip").getValue() + #else + + #end + | +
+ #set($nrOfPages = $document.getRootElement().getChildren().size()) + $nrOfPages pages has been analyzed + + #set($nrOfDecimals = 0) + #set($nrOfJs = 0) + #set($nrOfCss = 0) + #set($nrOfCssImages = 0) + #set($nrOfImages = 0) + #set($nrOfTotalRequests = 0) + #set($nrOfTotalRequestsPrimedCache = 0) + #set($totalPageWeight = 0) + #set($totalLoadTime = 0) + #set($totalScore = 0) + + #foreach ($results in $document.getRootElement().getChildren()) + + #if($!{results.getChild("stats").getChild("js").getChild("r")}) + #set ($nrOfJs = $math.add($nrOfJs, $results.getChild("stats").getChild("js").getChild("r").getValue())) + #end + + #if($!{results.getChild("stats").getChild("css").getChild("r")}) + #set ($nrOfCss = $math.add($nrOfCss,$results.getChild("stats").getChild("css").getChild("r").getValue())) + #end + + #if($!{results.getChild("stats").getChild("cssimage").getChild("r")}) + #set ($nrOfCssImages = $math.add($nrOfCssImages, $results.getChild("stats").getChild("cssimage").getChild("r").getValue())) + #end + + #if($!{results.getChild("stats").getChild("image").getChild("r")}) + #set ($nrOfImages = $math.add($nrOfImages, $results.getChild("stats").getChild("image").getChild("r").getValue())) + #end + + #if($!{results.getChild("r")}) + #set ($nrOfTotalRequests = $math.add($nrOfTotalRequests, $results.getChild("r").getValue())) + #end + + #if($!{results.getChild("r_c")}) + #set ($nrOfTotalRequestsPrimedCache = $math.add($nrOfTotalRequestsPrimedCache, $results.getChild("r_c").getValue())) + #end + + #if($!{results.getChild("w")}) + #set ($totalPageWeight = $math.add($totalPageWeight, $results.getChild("w").getValue())) + #end + + #if($!{results.getChild("lt")}) + #set ($totalLoadTime = $math.add($totalLoadTime, $results.getChild("lt").getValue())) + #end + + #if($!{results.getChild("o")}) + #set ($totalScore = $math.add($totalScore, $results.getChild("o").getValue())) + #end + + #end +
+ +| Type | +Total number | +Average | +
|---|---|---|
| JS | +$nrOfJs | +$math.roundTo($nrOfDecimals,$math.div($nrOfJs,$nrOfPages)) | +
| CSS | +$nrOfCss | +$math.roundTo($nrOfDecimals,$math.div($nrOfCss,$nrOfPages)) | +
| CSS images | +$nrOfCssImages | +$math.roundTo($nrOfDecimals,$math.div($nrOfCssImages,$nrOfPages)) | +
| Image | +$nrOfImages | +$math.roundTo($nrOfDecimals,$math.div($nrOfImages,$nrOfPages)) | +
| Requests | +$nrOfTotalRequests | +$math.roundTo($nrOfDecimals,$math.div($nrOfTotalRequests,$nrOfPages)) | +
| Requests primed cache | +$nrOfTotalRequestsPrimedCache | +$math.roundTo($nrOfDecimals,$math.div($nrOfTotalRequestsPrimedCache,$nrOfPages)) | +
| Page weight | +$totalPageWeight | +$math.roundTo($nrOfDecimals,$math.div($totalPageWeight,$nrOfPages)) | +
| Load time | +$totalLoadTime | +$math.roundTo($nrOfDecimals,$math.div($totalLoadTime,$nrOfPages)) | +
| Score | +$totalScore | +$math.roundTo($nrOfDecimals,$math.div($totalScore,$nrOfPages)) | +