merges for 2.2.3

This commit is contained in:
soulgalore 2013-12-02 10:12:54 +01:00
commit 2811f33f00
8 changed files with 51 additions and 23 deletions

View File

@ -1,8 +1,10 @@
CHANGELOG sitespeed.io
hotfix (coming in 2.3)
version 2.2.3
------------------------
* Bug fix: The sitespeed-sites script had wrong path to the sitespeed script
* Added the number of text assets that are missing GZIP on the summary page (xml) #310 and for pages #315. Add it by the name requestsWithoutGZipPerPage
* Fix in how to handle browser parameters, to get it to work clean with Jenkins
version 2.2.2
------------------------

View File

@ -132,6 +132,7 @@ build:
@cp $(REPORT)/$(VELOCITY)/$(INC)/$(COLUMNS)/spof-html-wrapper.vm $(BUILD)/$(REPORT)/$(VELOCITY)/$(INC)/$(COLUMNS)/
@cp $(REPORT)/$(VELOCITY)/$(INC)/$(COLUMNS)/jsSyncInHead-html-wrapper.vm $(BUILD)/$(REPORT)/$(VELOCITY)/$(INC)/$(COLUMNS)/
@cp $(REPORT)/$(VELOCITY)/$(INC)/$(COLUMNS)/url-html-wrapper.vm $(BUILD)/$(REPORT)/$(VELOCITY)/$(INC)/$(COLUMNS)/
@cp $(REPORT)/$(VELOCITY)/$(INC)/$(COLUMNS)/requestsWithoutGZipPerPage.vm $(BUILD)/$(REPORT)/$(VELOCITY)/$(INC)/$(COLUMNS)/
@cp $(REPORT)/$(VELOCITY)/$(INC)/$(COLUMN-HEADERS)/browserScaledImages.vm $(BUILD)/$(REPORT)/$(VELOCITY)/$(INC)/$(COLUMN-HEADERS)/
@cp $(REPORT)/$(VELOCITY)/$(INC)/$(COLUMN-HEADERS)/criticalPathScore.vm $(BUILD)/$(REPORT)/$(VELOCITY)/$(INC)/$(COLUMN-HEADERS)/
@cp $(REPORT)/$(VELOCITY)/$(INC)/$(COLUMN-HEADERS)/cssImagesPerPage.vm $(BUILD)/$(REPORT)/$(VELOCITY)/$(INC)/$(COLUMN-HEADERS)/
@ -153,6 +154,7 @@ build:
@cp $(REPORT)/$(VELOCITY)/$(INC)/$(COLUMN-HEADERS)/spof.vm $(BUILD)/$(REPORT)/$(VELOCITY)/$(INC)/$(COLUMN-HEADERS)/
@cp $(REPORT)/$(VELOCITY)/$(INC)/$(COLUMN-HEADERS)/genericTimeMetrics.vm $(BUILD)/$(REPORT)/$(VELOCITY)/$(INC)/$(COLUMN-HEADERS)/
@cp $(REPORT)/$(VELOCITY)/$(INC)/$(COLUMN-HEADERS)/url.vm $(BUILD)/$(REPORT)/$(VELOCITY)/$(INC)/$(COLUMN-HEADERS)/
@cp $(REPORT)/$(VELOCITY)/$(INC)/$(COLUMN-HEADERS)/requestsWithoutGZipPerPage.vm $(BUILD)/$(REPORT)/$(VELOCITY)/$(INC)/$(COLUMN-HEADERS)/
package:
@mv build sitespeed.io-$(SITESPEED_IO_VERSION)
@tar -cvzf sitespeed.io-$(SITESPEED_IO_VERSION).tar.gz sitespeed.io-$(SITESPEED_IO_VERSION)/

View File

@ -805,6 +805,9 @@ then
local pagefilename=$(get_filename $url $runs)
echo "Collecting Browser Time metrics: $url"
## Fix when shuffling the parameters from Java (Jenkins), then the " will be passed and needs to be removed
BROWSER_TIME_PARAMS=${BROWSER_TIME_PARAMS//[\"]/}
$BROWSERTIME --compact --raw $BROWSER_TIME_PARAMS -o "$REPORT_DATA_METRICS_DIR/$pagefilename.xml" -ua "\"$USER_AGENT\"" -w $VIEWPORT "$url"
## If BrowserTime fails, an empty file is created, so remove it

View File

@ -31,6 +31,8 @@ criticalPathScore=GREATER_THAN;99;95
requestsWithoutExpires=LESS_THAN;1;5
## The amount of text content on a page in percentage
textContent=GREATER_THAN;49;25
# Gzip requests
requestsWithoutGZipPerPage=LESS_THAN;1.0;1.0
## The server response time
serverResponseTime=LESS_THAN;300;500
## The number of DOM elements
@ -51,5 +53,5 @@ domContentLoadedTime=LESS_THAN;500;700
backEndTime=LESS_THAN;400;600
# frontEndTime
frontEndTime=LESS_THAN;300;400
# Cache time (in seconds)
#assetsCacheTime=GREATER_THAN;31556925;2592000
# Time to first paint
firstPaintTime=LESS_THAN;500;700

View File

@ -39,10 +39,13 @@ domElements=LESS_THAN;901;1008
domainsPerPage=LESS_THAN;3;7
## The number of browser scaled images
browserScaledImages=LESS_THAN;1;2
# Gzip requests
requestsWithoutGZipPerPage=LESS_THAN;1.0;1.0
## Redirection time
redirectionTime=LESS_THAN;1.0;1.0
pageDownloadTime=LESS_THAN;20;40
domInteractiveTime=LESS_THAN;500;600
domContentLoadedTime=LESS_THAN;500;600
backEndTime=LESS_THAN;400;600
frontEndTime=LESS_THAN;300;400
frontEndTime=LESS_THAN;300;400
firstPaintTime=LESS_THAN;500;600

View File

@ -0,0 +1,2 @@
#set($tooltipMissingGZipText = "The number of text assets missing GZip")
#columnHeaderHTML("requests missing gzip","int",$tooltipMissingGZipText,"")##

View File

@ -0,0 +1,5 @@
#if($!{results.getChild("g").getChild("ycompress")})##
$results.getChild("g").getChild("ycompress").getChild("components").getChildren("item").size()##
#else##
0##
#end##

View File

@ -3,7 +3,7 @@
#set($nrOfPages = $document.getRootElement().getChildren("results").size())
## Get the total objects
#set($nrOfDecimals = 0)
## Creating all statistics objects
@ -32,6 +32,7 @@
#set($statsAssetCacheTimeInSeconds = $stats.newInstance("assetsCacheTime","Cache time","","cachetime","",1))
#set($statsDomElements = $stats.newInstance("domElements","Number of DOM elements","","","",1))
#set($statsDomains = $stats.newInstance("domainsPerPage","Number of domains","","","",1))
#set($statsCompressed = $stats.newInstance("requestsWithoutGZipPerPage","Requests without GZip","","","",1))
## And add them to the list of statistics
#set($hide = $allStats.add($statsScore))
@ -59,15 +60,15 @@
#set($hide = $allStats.add($statsAssetCacheTimeInSeconds))
#set($hide = $allStats.add($statsDomains))
#set($hide = $allStats.add($statsScaledImages))
#set($hide = $allStats.add($statsCompressed))
## Fetch all statistics used by the boxes
#foreach ($results in $document.getRootElement().getChildren())
#if($!{results.getChild("stats").getChild("js").getChild("r")})
$statsJs.addValue($math.toInteger($results.getChild("stats").getChild("js").getChild("r").getValue()))
#end
#end
#if($!{results.getChild("stats").getChild("css").getChild("r")})
$statsCss.addValue($math.toInteger($results.getChild("stats").getChild("css").getChild("r").getValue()))
#end
@ -83,7 +84,7 @@
#if($!{results.getChild("r")})
$statsRequests.addValue($math.toInteger($results.getChild("r").getValue()))
#end
#if($!{results.getChild("w")})
## sometimes the page weight is wrongly calculated by YSlow, so lets do it manually
#set($totalWeight = 0)
@ -99,7 +100,7 @@
#end
#if($!{results.getChild("stats").getChild("doc").getChild("w")})
$statsDocumentWeight.addValue($math.toDouble($math.roundTo(3,$math.div($results.getAttribute("size").getValue(),1000))))
#end
@ -113,8 +114,16 @@
$statsSpofPages.addValue(1)
$statsSpof.addValue($math.toInteger($results.getChild("g").getChild("spof").getChild("components").getChildren("item").size()))
#else
$statsSpof.addValue(0)
#end
$statsSpof.addValue(0)
#end
#end
#if($!{results.getChild("g").getChild("ycompress").getChild("score")})
#if ($results.getChild("g").getChild("ycompress").getChild("score").getValue() != 100)
$statsCompressed.addValue($math.toInteger($results.getChild("g").getChild("ycompress").getChild("components").getChildren("item").size()))
#else
$statsCompressed.addValue(0)
#end
#end
@ -153,34 +162,34 @@
#set ($date = "")
#set ($cacheControl = 0)
#set ($expires = "")
## fetch the real ones
#set ($lastMod = $asset.getChild("headers").getChild("response").getChild("Last-Modified").getValue())
#set ($date = $asset.getChild("headers").getChild("response").getChild("Date").getValue())
#set ($cacheControl = $asset.getChild("headers").getChild("response").getChild("Cache-Control").getValue())
#set ($expires = $asset.getChild("headers").getChild("response").getChild("Expires").getValue())
#set ($delta = $header.getDelta($lastMod,$date))
#if ($delta=="" || ! $delta)
## unknown skip it for now
#else
$statsTimeSinceLastModificationInSeconds.addValue($delta.getSeconds())
#end
#end
#set ($cacheTime = $header.getCacheTime($cacheControl, $expires, $date))
#if ($cacheTime=="" || !$cacheTime)
$statsAssetCacheTimeInSeconds.addValue(0)
#else
#else
$statsAssetCacheTimeInSeconds.addValue($cacheTime.getSeconds())
#end
#if (($asset.getChild("type").getValue() == "image") || ($asset.getChild("type").getValue() == "cssimage"))
$statsImageWeight.addValue($math.toDouble($math.roundTo(3,$math.div($asset.getChild("size").getValue(),1000))))
#set($totalImagePageSize = $math.add($totalImagePageSize,$math.toDouble($math.roundTo(3,$math.div($asset.getChild("size").getValue(),1000)))))
#elseif ($asset.getChild("type").getValue() == "css")
#elseif ($asset.getChild("type").getValue() == "css")
$statsCssWeight.addValue($math.toDouble($math.roundTo(3,$math.div($asset.getChild("size").getValue(),1000))))
#set($totalCssPageSize = $math.add($totalCssPageSize,$math.toDouble($math.roundTo(3,$math.div($asset.getChild("size").getValue(),1000)))))
#elseif ($asset.getChild("type").getValue() == "js")
#elseif ($asset.getChild("type").getValue() == "js")
$statsJsWeight.addValue($math.toDouble($math.roundTo(3,$math.div($asset.getChild("size").getValue(),1000))))
#set($totalJsPageSize = $math.add($totalJsPageSize,$math.toDouble($math.roundTo(3,$math.div($asset.getChild("size").getValue(),1000)))))
#end
@ -190,7 +199,7 @@
#if (!$hosts.contains($theHost))
#set($swallow = $hosts.add($theHost))
#end
#end
#if($hosts.size()>0)
@ -206,7 +215,7 @@
#if($totalJsPageSize>0)
$statsTotalJsWeight.addValue($totalJsPageSize)
#end
#end
## We create only these extra data if (and only if) we also run Browser Time to collect them
@ -239,9 +248,9 @@
## Include a custom logic file, if you want to include your own code.
#if ($filetool.doFileExist("report/velocity/logic/custom/site.summary.xml.logic.vm"))
#parse("report/velocity/logic/custom/site.summary.xml.logic.vm")
#end
#end