also show speed index for columns

This commit is contained in:
soulgalore 2014-06-28 09:13:05 -07:00
parent f37c8cccb3
commit bae3de6bf9
2 changed files with 15 additions and 3 deletions

View File

@ -25,6 +25,9 @@ exports.processPage = function(pageData) {
if (pageData.browsertime)
collectBrowserTime(pageData, p);
if (pageData.webpagetest)
collectWPT(pageData, p);
p.url = util.getURLFromPageData(pageData);
// TODO fix a cleaner check for this
@ -177,6 +180,14 @@ function collectGPSI(pageData, p) {
};
}
function collectWPT(pageData, p) {
p.wpt = {};
p.wpt.speedIndex = {
'v': pageData.webpagetest.response.data.median.firstView.SpeedIndex,
'unit': ''
};
}
function collectBrowserTime(pageData, p) {
p.timings = {};

View File

@ -322,15 +322,13 @@ config.summaryBoxes.push('criticalPathScore', 'jsSyncInHead',
'pageWeight', 'browserScaledImages', 'spofPerPage', 'numberOfDomains',
'singleDomainRequests', 'redirectsPerPage', 'cacheTime', 'timeSinceLastMod');
if (config.webpagetest)
if (config.webpagetestUrl)
config.summaryBoxes.push('wpt.imageSavings','wpt.speedIndex','wpt.visualComplete');
if (config.browser) {
config.summaryBoxes.push('serverResponseTime','backEndTime','frontEndTime','domContentLoadedTime','pageLoadTime','firstPaintTime');
}
// TODO add the default one when you run a BrowserTime
if (config.boxes) {
if (config.boxes[0].indexOf('+')===0) {
config.boxes[0].split(',').forEach(function (box) {
@ -353,6 +351,9 @@ if (config.browser)
if (config.googleKey)
config.pageColumns.push('gpsi.gscore');
if (config.webpagetestUrl)
config.pageColumns.push('wpt.speedIndex');
if (config.columns) {
config.pageColumns = config.columns[0].split(',');
}