Skip to content

Commit

Permalink
merges for 2.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
soulgalore committed Dec 2, 2013
2 parents 45f43c1 + 1f9fc8c commit 2811f33
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 23 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -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
------------------------
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)/
Expand All @@ -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)/
Expand Down
3 changes: 3 additions & 0 deletions bin/sitespeed.io
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions dependencies/rules-desktop.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
5 changes: 4 additions & 1 deletion dependencies/rules-mobile.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#set($tooltipMissingGZipText = "The number of text assets missing GZip")
#columnHeaderHTML("requests missing gzip","int",$tooltipMissingGZipText,"")##
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#if($!{results.getChild("g").getChild("ycompress")})##
$results.getChild("g").getChild("ycompress").getChild("components").getChildren("item").size()##
#else##
0##
#end##
47 changes: 28 additions & 19 deletions report/velocity/logic/site.summary.xml.logic.vm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#set($nrOfPages = $document.getRootElement().getChildren("results").size())

## Get the total objects

#set($nrOfDecimals = 0)

## Creating all statistics objects
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand All @@ -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

Expand All @@ -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


Expand Down Expand Up @@ -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
Expand All @@ -190,7 +199,7 @@
#if (!$hosts.contains($theHost))
#set($swallow = $hosts.add($theHost))
#end

#end

#if($hosts.size()>0)
Expand All @@ -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
Expand Down Expand Up @@ -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






0 comments on commit 2811f33

Please sign in to comment.