new switch for fetching navtiming with phantomjs
This commit is contained in:
parent
b90add6720
commit
73e0732706
|
|
@ -33,7 +33,7 @@ Analyzer.prototype.analyze = function(urls, collector, downloadErrors, analysisE
|
|||
}
|
||||
},
|
||||
function(cb) {
|
||||
if (config.runYslow) {
|
||||
if (config.phantomjs) {
|
||||
phantomjs.analyze(urls, cb);
|
||||
} else {
|
||||
cb(undefined, {});
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ module.exports = {
|
|||
|
||||
} else {
|
||||
var queue = async.queue(phantomjs, config.threads);
|
||||
|
||||
|
||||
var errors = {};
|
||||
var pageData = {};
|
||||
urls.forEach(function(u) {
|
||||
|
|
|
|||
|
|
@ -265,6 +265,10 @@ config = require('nomnom').options({
|
|||
flag: true,
|
||||
help: 'Set to true to turn of collecting metrics using YSlow.',
|
||||
},
|
||||
phantomjs: {
|
||||
flag: true,
|
||||
help: 'Set to true to turn fetch Navigation Timing metrics using PhantomJS. Needs PhantomJS 2.0',
|
||||
},
|
||||
wptLocation: {
|
||||
metavar: '<STRING>',
|
||||
help: 'WebPageTest location, something like Dulles:Chrome ',
|
||||
|
|
|
|||
Loading…
Reference in New Issue