also show speed index for columns
This commit is contained in:
parent
f37c8cccb3
commit
bae3de6bf9
|
|
@ -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 = {};
|
||||
|
||||
|
|
|
|||
|
|
@ -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(',');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue