Minor style nits.
This commit is contained in:
parent
2682a38eab
commit
33c91eef88
|
|
@ -19,7 +19,7 @@ module.exports = {
|
|||
if (browsertimeRunData.timings[timing]) {
|
||||
statsHelpers.pushGroupStats(this.statsPerType, this.groups[group], timing, browsertimeRunData.timings[timing]);
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
forEach(browsertimeRunData.timings.navigationTiming, (value, name) => {
|
||||
statsHelpers.pushGroupStats(this.statsPerType, this.groups[group], ['navigationTiming', name], value);
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ module.exports = {
|
|||
|
||||
// we only sends individual groups to Graphite, not the
|
||||
// total of all groups (you can calculate that yourself)
|
||||
if (message.group === 'total') {
|
||||
if (message.group === 'total') {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -62,8 +62,6 @@ module.exports = {
|
|||
for (let key of Object.keys(flattenMess)) {
|
||||
this.metrics[message.type + '.' + key] = 1;
|
||||
}
|
||||
} else {
|
||||
return
|
||||
}
|
||||
},
|
||||
close() {
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ module.exports = {
|
|||
const options = clone(wptOptions);
|
||||
return wptClient.runTestAsync(urlOrScript, options)
|
||||
.then(function(data) {
|
||||
var id = data.data.id;
|
||||
const id = data.data.id;
|
||||
log.info('Got ' + url + ' analysed from ' + options.host);
|
||||
log.verbose('Got JSON from WebPageTest :%:2j', data);
|
||||
|
||||
|
|
@ -48,7 +48,7 @@ module.exports = {
|
|||
}
|
||||
|
||||
views.forEach(function(view) {
|
||||
for (var j = 1; j < wptOptions.runs + 1; j++) {
|
||||
for (let j = 1; j < wptOptions.runs + 1; j++) {
|
||||
// The WPT API wrapper mutates the options object, why ohh why?!?!?!
|
||||
const screenShotOptions = {
|
||||
run: j,
|
||||
|
|
@ -64,12 +64,12 @@ module.exports = {
|
|||
run: j,
|
||||
chartType: 'connection',
|
||||
repeatView: view === 'repeatView'
|
||||
}
|
||||
};
|
||||
|
||||
const timelineOptions = {
|
||||
run: j,
|
||||
repeatView: view === 'repeatView'
|
||||
}
|
||||
};
|
||||
|
||||
promises.push(
|
||||
Promise.join(wptClient.getScreenshotImageAsync(id, screenShotOptions), j, view,
|
||||
|
|
@ -81,7 +81,7 @@ module.exports = {
|
|||
Promise.join(wptClient.getWaterfallImageAsync(id, waterfallOptions), j, view,
|
||||
(result, index, view) => {
|
||||
return storageManager.writeDataForUrl(result, 'wpt-waterfall-' + index + '-' + view + '.png', url,
|
||||
'waterfall').catch(WPTAPIError, (error) => log.error('Couldnt get waterfall %s',error))
|
||||
'waterfall').catch(WPTAPIError, (error) => log.error('Couldnt get waterfall %s',error))
|
||||
})
|
||||
);
|
||||
|
||||
|
|
@ -101,12 +101,12 @@ module.exports = {
|
|||
}
|
||||
|
||||
}
|
||||
})
|
||||
});
|
||||
return Promise.all(promises).then(() => {
|
||||
const myResult = {
|
||||
data: data.data,
|
||||
har
|
||||
}
|
||||
};
|
||||
myResult.trace = traces;
|
||||
return myResult;
|
||||
})
|
||||
|
|
|
|||
|
|
@ -17,11 +17,11 @@ module.exports = {
|
|||
}
|
||||
},
|
||||
getURLAndGroup(options, group, url, includeQueryParams) {
|
||||
if(group && options.urlsMetaData && options.urlsMetaData[url] && options.urlsMetaData[url].alias) {
|
||||
if (group && options.urlsMetaData && options.urlsMetaData[url] && options.urlsMetaData[url].alias) {
|
||||
let alias = options.urlsMetaData[url].alias;
|
||||
return this.toSafeKey(group) + "." + this.toSafeKey(alias);
|
||||
return this.toSafeKey(group) + "." + this.toSafeKey(alias);
|
||||
} else {
|
||||
return flatten.keypathFromUrl(url, includeQueryParams);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue