added spof average per page
This commit is contained in:
parent
43d58caa62
commit
61e2118ac8
|
|
@ -68,8 +68,8 @@ error#end#end
|
|||
|
||||
## Verify the spof, if one or more, error!
|
||||
#macro ( spofType $spof )
|
||||
#if ($spof<1)success#else
|
||||
error#end#end
|
||||
#if ($spof>0)error#else
|
||||
success#end#end
|
||||
|
||||
## Verify the js loaded sync in head, if one or more, error!
|
||||
#macro ( totalJsSyncInHeadType $js )
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
#set($totalDocumentWeight = 0)
|
||||
#set($totalScore = 0)
|
||||
#set($totalSpof = 0)
|
||||
#set($totalSpofPages = 0)
|
||||
#set($totalJsSyncInHead = 0)
|
||||
|
||||
#foreach ($results in $document.getRootElement().getChildren())
|
||||
|
|
@ -58,7 +59,8 @@
|
|||
|
||||
#if($!{results.getChild("g").getChild("spof").getChild("score")})
|
||||
#if ($results.getChild("g").getChild("spof").getChild("score").getValue() != 100)
|
||||
#set ($totalSpof = $math.add($totalSpof, 1))
|
||||
#set ($totalSpofPages = $math.add($totalSpofPages, 1))
|
||||
#set ($totalSpof = $math.add($totalSpof, $results.getChild("g").getChild("spof").getChild("components").getChildren("item").size()))
|
||||
#end
|
||||
#end
|
||||
|
||||
|
|
@ -77,4 +79,5 @@
|
|||
#set ($requestPrimedAverage = $math.roundTo($nrOfDecimals,$math.div($nrOfTotalRequestsPrimedCache,$nrOfPages)))
|
||||
#set ($pageWeightAverage = $math.roundTo($nrOfDecimals,$math.div($totalPageWeight,$nrOfPages)))
|
||||
#set ($totalDocumentWeightAverage = $math.roundTo($nrOfDecimals,$math.div($totalDocumentWeight,$nrOfPages)))
|
||||
#set ($totalJsSyncInHeadAverage = $math.roundTo($nrOfDecimals,$math.div($totalJsSyncInHead,$nrOfPages)))
|
||||
#set ($totalJsSyncInHeadAverage = $math.roundTo($nrOfDecimals,$math.div($totalJsSyncInHead,$nrOfPages)))
|
||||
#set ($totalSpofAverage = $math.roundTo($nrOfDecimals,$math.div($totalSpof,$nrOfPages)))
|
||||
|
|
@ -76,9 +76,9 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="span3">
|
||||
<div class="alert alert-#spofType($totalSpof)">
|
||||
<div class="alert alert-#spofType($totalSpofPages)">
|
||||
Pages with SPOF
|
||||
<div class='large'>$totalSpof</div>
|
||||
<div class='large'>$totalSpofPages</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -91,7 +91,11 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="span3">
|
||||
|
||||
<div class="alert alert-#spofType($totalSpofAverage)">
|
||||
SPOF per page
|
||||
<div class='large'>$totalSpofAverage</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="span3">
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue